[PATCH 06/30] clk: renesas: Fix Realtime Module Stop Control Register offsets

Marek Vasut marek.vasut at gmail.com
Wed Apr 28 21:29:28 CEST 2021


From: Hai Pham <hai.pham.ud at renesas.com>

This patch fixes Realtime Module Stop Control Register (RMSTPCR) offsets
based on R-Car Gen3, H2/M2/M2N/E2/E2X hardware user's manual.
The r8a73a4 only has RMSTPCR0 - RMSTPCR5 so this calculation change
doesn't affect it.

Signed-off-by: Hai Pham <hai.pham.ud at renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
---
 drivers/clk/renesas/renesas-cpg-mssr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 7c1222f6c8..bed2a16448 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -55,7 +55,7 @@ static const u16 smstpcr[] = {
 
 
 /* Realtime Module Stop Control Register offsets */
-#define RMSTPCR(i)	(smstpcr[i] - 0x20)
+#define RMSTPCR(i)	((i) < 8 ? smstpcr[i] - 0x20 : smstpcr[i] - 0x10)
 
 /* Modem Module Stop Control Register offsets (r8a73a4) */
 #define MMSTPCR(i)	(smstpcr[i] + 0x20)
-- 
2.30.2



More information about the U-Boot mailing list