From: Jack Mitchell Date: Tue, 7 Jan 2020 15:51:55 +0000 (+0000) Subject: watchdog: dw_wdt: ping watchdog to reset countdown before start X-Git-Tag: v5.15~4522^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7046df873548bfc87c0c594ca473226c5d3317b;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200107155155.278521-1-ml@embed.me.uk Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index 738eee5..fba21de 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -143,6 +143,7 @@ static int dw_wdt_start(struct watchdog_device *wdd) struct dw_wdt *dw_wdt = to_dw_wdt(wdd); dw_wdt_set_timeout(wdd, wdd->timeout); + dw_wdt_ping(&dw_wdt->wdd); dw_wdt_arm_system_reset(dw_wdt); return 0;