diff options
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/wdt-uclass.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index 7570710c4d..6d0f473867 100644 --- a/drivers/watchdog/wdt-uclass.c +++ b/drivers/watchdog/wdt-uclass.c @@ -10,6 +10,7 @@ #include <errno.h> #include <hang.h> #include <log.h> +#include <sysreset.h> #include <time.h> #include <wdt.h> #include <asm/global_data.h> @@ -44,6 +45,13 @@ static void init_watchdog_dev(struct udevice *dev) priv = dev_get_uclass_priv(dev); + if (IS_ENABLED(CONFIG_SYSRESET_WATCHDOG_AUTO)) { + ret = sysreset_register_wdt(dev); + if (ret) + printf("WDT: Failed to register %s for sysreset\n", + dev->name); + } + if (!IS_ENABLED(CONFIG_WATCHDOG_AUTOSTART)) { printf("WDT: Not starting %s\n", dev->name); return; |