Skip to content

Commit 7dfd80f

Browse files
chleroyWim Van Sebroeck
authored andcommitted
watchdog: mpc8xxx_wdt: Reload the watchdog timer when enabling the watchdog
When the watchdog gets enabled with this driver, it leaves enough time for the core watchdog subsystem to start pinging it. But when the watchdog is already started by hardware or by the boot loader, little time remains before it fires and it happens that the core watchdog subsystem doesn't have time to start pinging it. Until commit 19ce949 ("watchdog: mpc8xxx: use the core worker function") pinging was managed by the driver itself and the watchdog was immediately pinged by setting the timer expiry to 0. So restore similar behaviour by pinging it when enabling it so that if it was already enabled the watchdog timer counter is reloaded. Fixes: 19ce949 ("watchdog: mpc8xxx: use the core worker function") Signed-off-by: Christophe Leroy <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 7c628fb commit 7dfd80f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/watchdog/mpc8xxx_wdt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ static int mpc8xxx_wdt_start(struct watchdog_device *w)
100100
ddata->swtc = tmp >> 16;
101101
set_bit(WDOG_HW_RUNNING, &ddata->wdd.status);
102102

103+
mpc8xxx_wdt_keepalive(ddata);
104+
103105
return 0;
104106
}
105107

0 commit comments

Comments
 (0)