aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/watchdog/renesas_wdt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
index 0dede5beb3f1..6b8c6ddfe30b 100644
--- a/drivers/watchdog/renesas_wdt.c
+++ b/drivers/watchdog/renesas_wdt.c
@@ -110,6 +110,16 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
110 return DIV_BY_CLKS_PER_SEC(priv, 65536 - val); 110 return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
111} 111}
112 112
113static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
114 void *data)
115{
116 struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
117
118 rwdt_start(wdev);
119 rwdt_write(priv, 0xffff, RWTCNT);
120 return 0;
121}
122
113static const struct watchdog_info rwdt_ident = { 123static const struct watchdog_info rwdt_ident = {
114 .options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT, 124 .options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
115 .identity = "Renesas WDT Watchdog", 125 .identity = "Renesas WDT Watchdog",
@@ -121,6 +131,7 @@ static const struct watchdog_ops rwdt_ops = {
121 .stop = rwdt_stop, 131 .stop = rwdt_stop,
122 .ping = rwdt_init_timeout, 132 .ping = rwdt_init_timeout,
123 .get_timeleft = rwdt_get_timeleft, 133 .get_timeleft = rwdt_get_timeleft,
134 .restart = rwdt_restart,
124}; 135};
125 136
126#if defined(CONFIG_ARCH_RCAR_GEN2) && defined(CONFIG_SMP) 137#if defined(CONFIG_ARCH_RCAR_GEN2) && defined(CONFIG_SMP)
@@ -220,6 +231,7 @@ static int rwdt_probe(struct platform_device *pdev)
220 platform_set_drvdata(pdev, priv); 231 platform_set_drvdata(pdev, priv);
221 watchdog_set_drvdata(&priv->wdev, priv); 232 watchdog_set_drvdata(&priv->wdev, priv);
222 watchdog_set_nowayout(&priv->wdev, nowayout); 233 watchdog_set_nowayout(&priv->wdev, nowayout);
234 watchdog_set_restart_priority(&priv->wdev, 0);
223 235
224 /* This overrides the default timeout only if DT configuration was found */ 236 /* This overrides the default timeout only if DT configuration was found */
225 ret = watchdog_init_timeout(&priv->wdev, 0, &pdev->dev); 237 ret = watchdog_init_timeout(&priv->wdev, 0, &pdev->dev);