2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00

watchdog: renesas_wdt: add grace period before rebooting

arm64 does not have a grace period after calling reset handlers. It is
rightfully assumed that watchdog drivers should wait because they know
the time needed. Implement this for the Renesas watchdog driver.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@oeck-us.net>
Link: https://lore.kernel.org/r/20210118094558.36814-1-wsa+renesas@sang-engineering.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
Wolfram Sang 2021-01-18 10:45:58 +01:00 committed by Wim Van Sebroeck
parent ac288a7b1a
commit e007372bfb

View File

@ -151,6 +151,9 @@ static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
rwdt_write(priv, RWTCSRA_TME, RWTCSRA);
/* wait 2 cycles, so watchdog will trigger */
udelay(DIV_ROUND_UP(2 * 1000000, priv->clk_rate));
return 0;
}