[PATCH 1/5] mtd: spi: renesas: Write DREAR register once
Marek Vasut
marek.vasut+renesas at mailbox.org
Sat Aug 31 22:31:44 CEST 2024
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 <marek.vasut+renesas at mailbox.org>
---
Cc: "Cédric Le Goater" <clg at kaod.org>
Cc: Hai Pham <hai.pham.ud at renesas.com>
Cc: Jagan Teki <jagan at amarulasolutions.com>
Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
Cc: Paul Barker <paul.barker.ct at bp.renesas.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: William Zhang <william.zhang at broadcom.com>
Cc: u-boot at 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);
}
--
2.45.2
More information about the U-Boot
mailing list