[PATCH master 3/6] clocksource: armv7m_systick: fix MMIO address

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Jun 12 05:53:28 PDT 2023


SYST_CALIB is a register within the ARMv7-M SysTick peripheral, but we
erroneously dereferenced some random spot within the barebox data
section. Fix this.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/clocksource/armv7m_systick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/armv7m_systick.c b/drivers/clocksource/armv7m_systick.c
index f299d334a76e..33ac426878ba 100644
--- a/drivers/clocksource/armv7m_systick.c
+++ b/drivers/clocksource/armv7m_systick.c
@@ -64,7 +64,7 @@ static int armv7m_systick_probe(struct device *dev)
 
 	writel_relaxed(SYSTICK_LOAD_RELOAD_MASK, systick_base + SYST_RVR);
 
-	cal = readl(&systick_base + SYST_CALIB);
+	cal = readl(systick_base + SYST_CALIB);
 	if (cal & SYSTICK_CAL_NOREF)
 		writel(SYSTICK_CTRL_EN | SYSTICK_CTRL_CPU_CLK, systick_base + SYST_CSR);
 	else
-- 
2.39.2




More information about the barebox mailing list