diff options
-rw-r--r-- | drivers/watchdog/wdt-uclass.c | 9 | ||||
-rw-r--r-- | include/wdt.h | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index 10be334e9ed..b32590069d9 100644 --- a/drivers/watchdog/wdt-uclass.c +++ b/drivers/watchdog/wdt-uclass.c @@ -46,6 +46,15 @@ struct wdt_priv { struct cyclic_info cyclic; }; +int wdt_set_force_autostart(struct udevice *dev) +{ + struct wdt_priv *priv = dev_get_uclass_priv(dev); + + priv->autostart = true; + + return 0; +} + static void wdt_cyclic(struct cyclic_info *c) { struct wdt_priv *priv = container_of(c, struct wdt_priv, cyclic); diff --git a/include/wdt.h b/include/wdt.h index 5026f5a6db4..1ef656585c4 100644 --- a/include/wdt.h +++ b/include/wdt.h @@ -19,6 +19,15 @@ struct udevice; */ /* + * Force watchdog start during init. Called by driver's probe when the watchdog + * is detected as already started. + * + * @dev: WDT Device + * @return: 0 if OK, -ve on error + */ +int wdt_set_force_autostart(struct udevice *dev); + +/* * Start the timer * * @dev: WDT Device |