* [PATCH] watchdog: rti_wdt: return 0 even when not ready for ping
@ 2025-03-17 10:40 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2025-03-17 10:40 UTC (permalink / raw)
To: Barebox List
The rti_wdt is a windowed watchdog which means we are not allowed to
ping the watchdog outside a certain timing window. When pinging the
watchdog too early the watchdog will trigger.
We used to return -EBUSY from the watchdogs ping callback when
pinging outside the timing window. We may ping the watchdog multiple
times in boot_entry() which then results in
Failed to enable watchdog: Device or resource busy
Avoid these messages by returning successfully even when pinged too
early.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/watchdog/rti_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
index f5ca6683db..ffc4427059 100644
--- a/drivers/watchdog/rti_wdt.c
+++ b/drivers/watchdog/rti_wdt.c
@@ -56,7 +56,7 @@ static int rti_wdt_ping(struct watchdog *wdt)
halftime = wdt->timeout_cur / 2 + 1;
if (!is_timeout_non_interruptible(wdt->last_ping, halftime * SECOND))
- return -EBUSY;
+ return 0;
writel(WDKEY_SEQ0, priv->regs + RTIWDKEY);
writel(WDKEY_SEQ1, priv->regs + RTIWDKEY);
--
2.39.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-03-17 10:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-17 10:40 [PATCH] watchdog: rti_wdt: return 0 even when not ready for ping Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox