mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
watchdog: imx_sc_wdt: Fix reboot on crash
commit e56d48e92b1017b6a8dbe64923a889283733fd96 upstream.
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: 986857acbc ("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]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
3003daa76b
commit
f7d57ba8d7
1 changed files with 5 additions and 0 deletions
|
|
@ -177,6 +177,11 @@ static int imx_sc_wdt_probe(struct platform_device *pdev)
|
|||
wdog->timeout = DEFAULT_TIMEOUT;
|
||||
|
||||
watchdog_init_timeout(wdog, 0, dev);
|
||||
|
||||
ret = imx_sc_wdt_set_timeout(wdog, wdog->timeout);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
watchdog_stop_on_reboot(wdog);
|
||||
watchdog_stop_on_unregister(wdog);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue