Skip to content

Commit e56d48e

Browse files
fabioestevamWim Van Sebroeck
authored andcommitted
watchdog: imx_sc_wdt: Fix reboot on crash
Currently when running the samples/watchdog/watchdog-simple.c application and forcing a kernel crash by doing: # ./watchdog-simple & # echo c > /proc/sysrq-trigger The system does not reboot as expected. Fix it by calling imx_sc_wdt_set_timeout() to configure the i.MX8QXP watchdog with a proper timeout. Cc: <[email protected]> Fixes: 986857a ("watchdog: imx_sc: Add i.MX system controller watchdog support") Reported-by: Breno Lima <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Tested-by: Breno Lima <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 0f0dbd9 commit e56d48e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/watchdog/imx_sc_wdt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ static int imx_sc_wdt_probe(struct platform_device *pdev)
175175
wdog->timeout = DEFAULT_TIMEOUT;
176176

177177
watchdog_init_timeout(wdog, 0, dev);
178+
179+
ret = imx_sc_wdt_set_timeout(wdog, wdog->timeout);
180+
if (ret)
181+
return ret;
182+
178183
watchdog_stop_on_reboot(wdog);
179184
watchdog_stop_on_unregister(wdog);
180185

0 commit comments

Comments
 (0)