From patchwork Sat Aug 31 20:31:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1979357 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=N49OQMA7; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=Wr3ZiCpG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wx6Bl3Kp0z1yfK for ; Sun, 1 Sep 2024 06:32:15 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6416488D3D; Sat, 31 Aug 2024 22:32:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="N49OQMA7"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="Wr3ZiCpG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0B9C088D86; Sat, 31 Aug 2024 22:32:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CDDBB8861D for ; Sat, 31 Aug 2024 22:32:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Wx6Bd3lBqz9sWF; Sat, 31 Aug 2024 22:32:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1725136329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WCLt5JRccAfowenUJSezdNcgirjlnH5Uc0LuUqIW1hA=; b=N49OQMA7M2FAW82Nu31Vi6iaVxZpdaUgOQOJSysb/BBKkKSp+93o6O2Ucz0s/0kbstsUc6 7tHHeKkqMSOPK7lauhp0D/CE4Dphqg1ZmRkU0zmdYqSL9bjhQNxYtAGKQ9k6KTTnuLIPUS U3Ww38uodjdlpEHCSvRSPY9bnsSfvufBeR+FAtdO4N21CJd7WwyLSdzM4AuoRRa3rvpsKc TjknGBnY5qe18drwFDZD/hRqEijk9B37LzW5mqe1OSoWGZQD4Wmc+gsGkVyLDisjrtD/y5 Zw8IskgGp+vbjJoFNA5T4QBsnJIZWbPetbaimxhDMACyIHexj/sb+kIKC+BuyQ== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1725136327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WCLt5JRccAfowenUJSezdNcgirjlnH5Uc0LuUqIW1hA=; b=Wr3ZiCpGkcmnr2rIGJXtTLOC6aKlZuOmaOVwHyFkkWoD6a3WcYaRtcWljw8vbgS6Z9lbYw e+dpSRTocXLGYcBR/W4rziCE32Ev8mC0QKTaKQkNhql/rNx4t8o/07peiaEUxw5BPnF6rP +yucIBCAsqJUdPeEFCInh7YUSNvOVi6WJ7uo5dU8+BUL9wkoGJJ15CClKtTuNDmyr7fHgv XnLnO5EgDWngYneLKp7B8L01k7+E0lvdGgCovl9RBOL60B46uykdUtyzJx7EBgWGhb92R/ Q2E2FL3zfO28yNyr1bmLD7avhyqNEfl09joUkWfe+ZzPojnvOBn63c1bmEZkcw== To: u-boot@lists.denx.de Cc: Marek Vasut , =?utf-8?q?C=C3=A9dric_Le_?= =?utf-8?q?Goater?= , Hai Pham , Jagan Teki , Nobuhiro Iwamatsu , Paul Barker , Tom Rini , William Zhang Subject: [PATCH 1/5] mtd: spi: renesas: Write DREAR register once Date: Sat, 31 Aug 2024 22:31:44 +0200 Message-ID: <20240831203153.547743-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: 0346725e6fc4e2924d6 X-MBO-RS-META: 1nw6r9gtnsnzcpomqcs8riay6j4tuh5w X-Rspamd-Queue-Id: 4Wx6Bd3lBqz9sWF X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Instead of writing DREAR with 0 first and then overwriting DREAR again in case of 4 byte addressing mode, write DREAR in every case once with the correct content right away. No functional change. Signed-off-by: Marek Vasut --- Cc: "Cédric Le Goater" Cc: Hai Pham Cc: Jagan Teki Cc: Nobuhiro Iwamatsu Cc: Paul Barker Cc: Tom Rini Cc: William Zhang Cc: u-boot@lists.denx.de --- drivers/spi/renesas_rpc_spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c index e6b602cf7b4..749c686a6c4 100644 --- a/drivers/spi/renesas_rpc_spi.c +++ b/drivers/spi/renesas_rpc_spi.c @@ -277,14 +277,15 @@ static int rpc_spi_mem_exec_op(struct spi_slave *spi, writel(RPC_DRCMR_CMD(op->cmd.opcode), priv->regs + RPC_DRCMR); smenr |= RPC_DRENR_CDE; - writel(0, priv->regs + RPC_DREAR); if (op->addr.nbytes == 4) { writel(RPC_DREAR_EAV(offset >> 25) | RPC_DREAR_EAC(1), priv->regs + RPC_DREAR); smenr |= RPC_DRENR_ADE(0xF); } else if (op->addr.nbytes == 3) { + writel(0, priv->regs + RPC_DREAR); smenr |= RPC_DRENR_ADE(0x7); } else { + writel(0, priv->regs + RPC_DREAR); smenr |= RPC_DRENR_ADE(0); }