Commit e7046df873548bfc87c0c594ca473226c5d3317b

Authored by Jack Mitchell
Committed by Wim Van Sebroeck
1 parent 69503e5851

watchdog: dw_wdt: ping watchdog to reset countdown before start

Currently on an rk3288 SoC when trying to use the watchdog the SoC will
instantly reset. This is due to the watchdog countdown counter being set
to its initial value of 0x0. Reset the watchdog counter before start in
order to correctly start the countdown timer from the right position.

Signed-off-by: Jack Mitchell <ml@embed.me.uk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200107155155.278521-1-ml@embed.me.uk
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/watchdog/dw_wdt.c
... ... @@ -143,6 +143,7 @@
143 143 struct dw_wdt *dw_wdt = to_dw_wdt(wdd);
144 144  
145 145 dw_wdt_set_timeout(wdd, wdd->timeout);
  146 + dw_wdt_ping(&dw_wdt->wdd);
146 147 dw_wdt_arm_system_reset(dw_wdt);
147 148  
148 149 return 0;