diff options
author | Grzegorz Jaszczyk <[email protected]> | 2021-06-18 21:50:33 +0200 |
---|---|---|
committer | Wim Van Sebroeck <[email protected]> | 2021-08-22 10:28:08 +0200 |
commit | 14244b7c04d6611388e9312059df11b9c39a4f6c (patch) | |
tree | d6f8b4c189cd9e2baf5c4256cb457378981ee971 | |
parent | 60bcd91aafd22ef62cef9ae2037fa2e1d4da2fb3 (diff) |
watchdog: imx2_wdg: notify wdog core to stop ping worker on suspend
Suspend routine disables wdog clk. Nevertheless, the watchdog subsystem
is not aware of that and can still try to ping wdog through
watchdog_ping_work. In order to prevent such condition and therefore
prevent from system hang (caused by the wdog register access issued
while the wdog clock is disabled) notify watchdog core that the ping
worker should be canceled during watchdog core suspend and restored
during resume.
Signed-off-by: Michal Koziel <[email protected]>
Signed-off-by: Grzegorz Jaszczyk <[email protected]>
Reviewed-by: Guenter Roeck <[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]>
-rw-r--r-- | drivers/watchdog/imx2_wdt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index cc86018c5eb5..51bfb796898b 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c @@ -317,6 +317,7 @@ static int __init imx2_wdt_probe(struct platform_device *pdev) watchdog_set_nowayout(wdog, nowayout); watchdog_set_restart_priority(wdog, 128); watchdog_init_timeout(wdog, timeout, dev); + watchdog_stop_ping_on_suspend(wdog); if (imx2_wdt_is_running(wdev)) { imx2_wdt_set_timeout(wdog, wdog->timeout); |