From: Tero Kristo Date: Thu, 12 Mar 2020 09:58:06 +0000 (+0200) Subject: watchdog: reset last_hw_keepalive time at start X-Git-Tag: v5.15~4032^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=982bb70517aef2225bad1d802887b733db492cc0;p=platform%2Fkernel%2Flinux-starfive.git watchdog: reset last_hw_keepalive time at start Currently the watchdog core does not initialize the last_hw_keepalive time during watchdog startup. This will cause the watchdog to be pinged immediately if enough time has passed from the system boot-up time, and some types of watchdogs like K3 RTI does not like this. To avoid the issue, setup the last_hw_keepalive time during watchdog startup. Signed-off-by: Tero Kristo Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200302200426.6492-3-t-kristo@ti.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index 8b5c742..7e4cd34 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -282,6 +282,7 @@ static int watchdog_start(struct watchdog_device *wdd) if (err == 0) { set_bit(WDOG_ACTIVE, &wdd->status); wd_data->last_keepalive = started_at; + wd_data->last_hw_keepalive = started_at; watchdog_update_worker(wdd); }