Commit 1aea5228 authored by Linus Walleij's avatar Linus Walleij Committed by Wim Van Sebroeck

watchdog: ixp4xx: Implement restart

Implement watchdog restart in the IXP4xx watchdog timer.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220206230028.476659-1-linus.walleij@linaro.orgSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 7a6b3d8a
...@@ -84,10 +84,24 @@ static int ixp4xx_wdt_set_timeout(struct watchdog_device *wdd, ...@@ -84,10 +84,24 @@ static int ixp4xx_wdt_set_timeout(struct watchdog_device *wdd,
return 0; return 0;
} }
static int ixp4xx_wdt_restart(struct watchdog_device *wdd,
unsigned long action, void *data)
{
struct ixp4xx_wdt *iwdt = to_ixp4xx_wdt(wdd);
__raw_writel(IXP4XX_WDT_KEY, iwdt->base + IXP4XX_OSWK_OFFSET);
__raw_writel(0, iwdt->base + IXP4XX_OSWT_OFFSET);
__raw_writel(IXP4XX_WDT_COUNT_ENABLE | IXP4XX_WDT_RESET_ENABLE,
iwdt->base + IXP4XX_OSWE_OFFSET);
return 0;
}
static const struct watchdog_ops ixp4xx_wdt_ops = { static const struct watchdog_ops ixp4xx_wdt_ops = {
.start = ixp4xx_wdt_start, .start = ixp4xx_wdt_start,
.stop = ixp4xx_wdt_stop, .stop = ixp4xx_wdt_stop,
.set_timeout = ixp4xx_wdt_set_timeout, .set_timeout = ixp4xx_wdt_set_timeout,
.restart = ixp4xx_wdt_restart,
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };
......
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