Thread (4 messages) 4 messages, 2 authors, 2024-11-01
STALE626d REVIEWED: 4 (4M)
Revisions (2)
  1. v2 [diff vs current]
  2. v2 current

[PATCH v2 RESEND 1/2] watchdog: apple: Actually flush writes after requesting watchdog restart

From: Nick Chan <hidden>
Date: 2024-10-29 01:31:21
Also in: asahi, linux-watchdog, lkml
Subsystem: arm/apple machine support, the rest, watchdog device drivers · Maintainers: Sven Peter, Janne Grunau, Linus Torvalds, Wim Van Sebroeck, Guenter Roeck

Although there is an existing code comment about flushing the writes,
writes were not actually being flushed.

Actually flush the writes by changing readl_relaxed() to readl().

Fixes: 4ed224aeaf661 ("watchdog: Add Apple SoC watchdog driver")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Guenter Roeck  <linux@roeck-us.net>
Signed-off-by: Nick Chan <redacted>
---
 drivers/watchdog/apple_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/apple_wdt.c b/drivers/watchdog/apple_wdt.c
index d4f739932f0b..62dabf223d90 100644
--- a/drivers/watchdog/apple_wdt.c
+++ b/drivers/watchdog/apple_wdt.c
@@ -130,7 +130,7 @@ static int apple_wdt_restart(struct watchdog_device *wdd, unsigned long mode,
 	 * can take up to ~20-25ms until the SoC is actually reset. Just wait
 	 * 50ms here to be safe.
 	 */
-	(void)readl_relaxed(wdt->regs + APPLE_WDT_WD1_CUR_TIME);
+	(void)readl(wdt->regs + APPLE_WDT_WD1_CUR_TIME);
 	mdelay(50);
 
 	return 0;
-- 
2.47.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help