From patchwork Mon Feb 12 14:03:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 199839 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2452107dyd; Mon, 12 Feb 2024 06:12:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUYdF+bqiGAiGp/SnlVYqJGTYCEYCwUFSkTxruK3lnfh9WM5RfSCBTd0j0+f/EUSjCAA7v5c18vg+U6SVxmIQgSD9jRRQ== X-Google-Smtp-Source: AGHT+IGEWkY0yBjFcxF35kFShJ022mi66/L9KL8Jzpj0WV1gU8CDiG0gDxn0Y1zksAaoC+3epXmc X-Received: by 2002:a17:902:fc8d:b0:1db:299f:5b0e with SMTP id mf13-20020a170902fc8d00b001db299f5b0emr546720plb.1.1707747168677; Mon, 12 Feb 2024 06:12:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707747168; cv=pass; d=google.com; s=arc-20160816; b=OVYOAbylq0RcIuMsrHpOcV5wjiGaZTbL/jQAW6Wer/VXVC/X1Og+zLVU7VWwWDvzGU 667TNYjLuX1qAZT3XziXvJELKBK/ovg/hMJIAhy5geo3pY0CXFRdD3NP2E5dYOBRDAFp +ySXu6MdaHjzPAJDO+Tg8xIXednw1BeBvcjgHPzxw6x+iVw7hUDNdoBI351LIroA74hs X4r/t6csYHUsC8EqgJwH6Kr6GsaSPoHW/Vx/Ztkm89e/EINKOsZw2CaMlnSHRV+j9Kri IJdHb04wXEihRDWwQKsqMnx90Q1VRkxQMHN09fqRf1sRZHX2XNkDJeFh447Iqx6pEuv8 h3ZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dzqxKaIV5lycuIt7a1okhuIIh6nU9oeZCJpLQ+HKFAg=; fh=SYSiMC1GQ8b2aRlC+WnQJ81x72hB73UH31B9JO/vi/I=; b=M2obyKPy8h3rcGCxK7Rj/qh2oJD+7DW+mVNyam95An4JPgvHwxXtXG6ZrVnJ0XJMmr fbyiRGBSXwOLYh/yBz7HWR69PTR//SBRxUUcWk//rbHIcdYAdyPu0JlMPHRi/nSIIL9b MQO3PIv3Z+7PeiaSJBs1s0cPIAjl1cEaN/tt112mz/lmRXcadBBc806VPsg+zknAnJs5 X3+Xe6r6rrp/FDauoayG725/D8IML4qfmOD1QHM3dIQTEapnUWZEk/RPwj/b5noD/Yot xnvj0eWD7rWjGrX9tzBqwKZT+smoEOh7tKnARrmObFQpsy6j7v8XH/FGdXuARyzTvOt0 icRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A8vYvTgz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-61799-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61799-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCXxGHm/E2jhII6C92k2D2ZPw4izqu0O+JJfNZaKMq8LhP3uGWclntI36AsEr36eqfdx1ZBLvDj5bXTE+BG8JXcOySLanQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u18-20020a170902e5d200b001d7561e0e8fsi303189plf.263.2024.02.12.06.12.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:12:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61799-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A8vYvTgz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-61799-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61799-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E436D2813BB for ; Mon, 12 Feb 2024 14:12:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A8B746B83; Mon, 12 Feb 2024 14:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="A8vYvTgz" Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E3894CE13 for ; Mon, 12 Feb 2024 14:04:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707746648; cv=none; b=B1E8myiFZblfRHRB+C9rUWV2fBYlEPTnJz90GD1Tb1tXgE0ei7iwYe1+WwAn4rcL0QVmgr7WtIggwzC7gHUBNCcQmS2jjoAHOss4glXLDmcsMy5B1iGPS6Vhio9+A+o5QiIHbOWdOI1/x2z9X3jq1OEXQL/b2laq3pHyqhj6Hgg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707746648; c=relaxed/simple; bh=QDMQ1KkcYtiV6MjOl7LHm4vYVsmfWSXZLbn40VwBYc8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ApJMGJg069imRzlxq3ilNA318sRkgMZKlj3QZ7xAyyezfi+L8rvVVbsHDB1/7kBy0uBlnVzwClYPAET8zpypcVJ1U+NornYfWSAMgy0d+a6Qi13ZlYHCzbtg3WqtNf0i2oxdXT+t4vhyhbiKW5Iv/NLAcveHU4LWNLudB+fLQJQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=A8vYvTgz; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-33b0ecb1965so1756201f8f.1 for ; Mon, 12 Feb 2024 06:04:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707746645; x=1708351445; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dzqxKaIV5lycuIt7a1okhuIIh6nU9oeZCJpLQ+HKFAg=; b=A8vYvTgzQnYDCOacYkD8QoBCFrIExkw5mJYZKKo5Y61ZCuX9yD2upsqKDyqYEEUTMO fyIkhNAH3tclSs/A/Lctckf2dRnyyR8gtkz7zOoYr7qVUjWRKdX86/bhJNvbt7sq++AM aEcBOVsYiVKUhP6tctB864/ak1wvIc4LkgwJcNaUZnA8Qrc/M8Xhzr2ZzHT9Ww/+YC1O k4nrYg9KnrNsOg3KLEuBilrAZ+6AVPCO1AC4/hemsUzhDhUCVvRvNN5LWZKRol99wZqK juyIpnfq4J9kq2Fa4ay/7IHKw95lSzS5U+EE1RSNW0UQnIMwNxXQixjfD1jONJc4sHvf jFYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707746645; x=1708351445; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dzqxKaIV5lycuIt7a1okhuIIh6nU9oeZCJpLQ+HKFAg=; b=o63Blt7w4MAd7hPBoRi3O1o02if5hIKoH+kFc6n5tcsThKhBm6LzBbep4zPCLEy0G4 P4tNumUrrPb6KbKZY5yHxnXN0GB9jqGuIUiajYLV+xGVjOzpYa18uCqcOTHjEylb77Rb ZikPgemJirPq5+vWfESH7L+NwNlCWiO/Hp/L4vEY4KZzIXzntpyhNdf6VcQjvyitXqcF 2Y+neiGKbyzPbQjy5KpvpAR3vngn4n4HebCcyV2HuKhRmYAZBrZH2VQv9z8AdJmofxC/ icsJOHSoxBV67vWXLrRZMfxh7zyiLsDgu9TnA4wu7pQ/9Qygo1+JSSw0DjCvnAyPOY8s r/GA== X-Forwarded-Encrypted: i=1; AJvYcCUQF3JuZIJ1Vs3rxZPorzmzoecQk0FYxr5F9PhdGqIbDb070rSBHspxShxzVOgNle3MEL4g/miQlM4aee2x4eETpRs02vGoxm0M+a94 X-Gm-Message-State: AOJu0Yz5e2SiH905CC9TUjI/I3Q4brRocCgPfcXHq5qXVGsRkEFFtS2u P8CLXtN6ascQ5oE9nLEWA0OzWPG4sVcb7OhCMR+ExMxfUpthODVYMR/PRZddtgE= X-Received: by 2002:adf:eac9:0:b0:33b:7947:d22 with SMTP id o9-20020adfeac9000000b0033b79470d22mr2896136wrn.57.1707746645615; Mon, 12 Feb 2024 06:04:05 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVoAQdPDjEx05yUQKNJ5YW19Z+nEZfGE5BKVBETz8rQvifVDgKkiVcO2vhxCGv7I3abloAAQMUTrSt3HZUu1hnKRQmjgYWEdx3Fx417AKeLfYRrdURrCKf4u8fvJAe9X7N3swQHP6jLMIjBj+8WOHIMkkdBzWRKTvKoZbcKRxdNLc0ZI2Rw5uIUmtM+GGw8bid4nqe5Fh37dNlKfvZ/nlCDHIS8xr/6X1Z01RvFMZShuEoyxy0MGsUTpCHdLqJIFywsuWJTRiRWWhdFfATqmkIxEdofDlg5oqd9yJXDCAWhTEXahk9yFIK9T45xAWj1hcYX/WhdX4IMO2Gxl4F+VTObdCr+2qnUSjaxjCZxAZAj4ZxpNrteSsVEX/ErAfECV2CzTZWl2fzgQuIF245xuPavSmSrbyjpYlgFquvUeFtcRHqloQftpPqSxgbNGv20faz67RIPgKmiUoL+tT++3P/zr7X1KxetLFSF3QG7H2oPKBtk66Da+ISCcfq1f1171mbUEcMyJqwWdSAx2seFVEBe8+SV2QmKn5X1Zxs3VGwTkol4yU0hzrw7XppoOsX2GyE/kKwEIcEswoxvkqdETEZzv7Djj3EyuUGEaZLE9B/7v2ILTvA= Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id v9-20020a5d4b09000000b0033b843786e1sm2135356wrq.51.2024.02.12.06.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:04:04 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, robh@kernel.org, andi.shyti@kernel.org, krzysztof.kozlowski@linaro.org, semen.protsenko@linaro.org, conor+dt@kernel.org Cc: alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, devicetree@vger.kernel.org, arnd@arndb.de, Tudor Ambarus Subject: [PATCH v2 12/12] spi: s3c64xx: switch exynos850 to new port config data Date: Mon, 12 Feb 2024 14:03:31 +0000 Message-ID: <20240212140331.915498-13-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog In-Reply-To: <20240212140331.915498-1-tudor.ambarus@linaro.org> References: <20240212140331.915498-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790702694825970225 X-GMAIL-MSGID: 1790702694825970225 Exynos850 has the same version of USI SPI (v2.1) as GS101. Drop the fifo_lvl_mask and rx_lvl_offset and switch to the new port config data. Backward compatibility with DT is not broken because when alises are set: - the SPI core will set the bus number according to the alias ID - the FIFO depth is always the same size for exynos850 (64 bytes) no matter the alias ID number. Advantages of the change: - drop dependency on the OF alias ID. - FIFO depth is inferred from the compatible. Exynos850 integrates 3 SPI IPs, all with 64 bytes FIFO depths. - use full mask for SPI_STATUS.{RX, TX}_FIFO_LVL fields. Using partial masks is misleading and can hide problems of the driver logic. Just compiled tested. Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 784786407d2e..9fcbe040cb2f 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1576,10 +1576,9 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = { }; static const struct s3c64xx_spi_port_config exynos850_spi_port_config = { - /* fifo_lvl_mask is deprecated. Use {rx, tx}_fifomask instead. */ - .fifo_lvl_mask = { 0x7f, 0x7f, 0x7f }, - /* rx_lvl_offset is deprecated. Use {rx, tx}_fifomask instead. */ - .rx_lvl_offset = 15, + .fifo_depth = 64, + .rx_fifomask = S3C64XX_SPI_ST_RX_FIFO_RDY_V2, + .tx_fifomask = S3C64XX_SPI_ST_TX_FIFO_RDY_V2, .tx_st_done = 25, .clk_div = 4, .high_speed = true,