Revert "drivers: watchdog: Remove useless Kconfig entry"

This reverts commit 45832ac1d6.

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
This commit is contained in:
Abhishek Shah 2020-09-08 22:39:46 +05:30 committed by Carles Cufí
commit 7f6676b556
2 changed files with 13 additions and 0 deletions

View file

@ -10,3 +10,12 @@ config WDOG_CMSDK_APB
help
Enable CMSDK APB Watchdog (WDOG_CMSDK_APB) Driver for ARM
family of MCUs.
config WDOG_CMSDK_APB_START_AT_BOOT
bool "Start Watchdog during boot"
depends on WDOG_CMSDK_APB
help
Enable this setting to allow WDOG to be automatically started
during device initialization. Note that once WDOG is started
it must be reloaded before the counter reaches 0, otherwise
the MCU will be reset.

View file

@ -192,6 +192,10 @@ static int wdog_cmsdk_apb_init(const struct device *dev)
z_NmiHandlerSet(wdog_cmsdk_apb_isr);
#endif
#ifdef CONFIG_WDOG_CMSDK_APB_START_AT_BOOT
wdog_cmsdk_apb_enable(dev);
#endif
return 0;
}