MLK-25482: watchdog: imx2_wdt: clear WDOG_HW_RUNNING before suspend
authorRobin Gong <yibin.gong@nxp.com>
Tue, 11 May 2021 10:18:01 +0000 (18:18 +0800)
committerRobin Gong <yibin.gong@nxp.com>
Tue, 11 May 2021 10:40:44 +0000 (18:40 +0800)
commit2586bba3a5157227254cd0a65f196aa36a7291f1
treefc32ec64804991690ef185e05fb3a74b48bf5421
parentcbad61d3fbc46bcb3cea826d808a0452d46f07fb
MLK-25482: watchdog: imx2_wdt: clear WDOG_HW_RUNNING before suspend

For watchdog_ping_work is not freezable so that it maybe scheduled before
imx2_wdt_resume where watchdog clock is on, hence, kernel will hang in
imx2_wdt_ping with clock disabled, and then watchdog reset happen.
Prevent the above case by clearing WDOG_HW_RUNNING before suspend, and
restore it with ping in imx2_wdt_resume.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
drivers/watchdog/imx2_wdt.c