Commit e007372b authored by Wolfram Sang's avatar Wolfram Sang Committed by Wim Van Sebroeck

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarGuenter Roeck <linux@oeck-us.net>
Link: https://lore.kernel.org/r/20210118094558.36814-1-wsa+renesas@sang-engineering.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent ac288a7b
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment