From 3dfceded487ba40d3a1a378da0fb43809256d12e Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Tue, 3 Mar 2020 09:50:28 +0100 Subject: [PATCH] drivers: watchdog: disable iwdg at boot on stm32 With this patch, the specific flag IWDG_STM32_START_AT_BOOT is replaced by the zephyr generic WDT_DISABLE_AT_BOOT. Signed-off-by: Francois Ramu --- drivers/watchdog/Kconfig.stm32 | 9 --------- drivers/watchdog/wdt_iwdg_stm32.c | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/watchdog/Kconfig.stm32 b/drivers/watchdog/Kconfig.stm32 index adec1409ab0..c8416fd6730 100644 --- a/drivers/watchdog/Kconfig.stm32 +++ b/drivers/watchdog/Kconfig.stm32 @@ -11,15 +11,6 @@ menuconfig IWDG_STM32 help Enable IWDG driver for STM32 line of MCUs -config IWDG_STM32_START_AT_BOOT - bool "Start IWDG during boot" - depends on IWDG_STM32 - help - Enable this setting to allow IWDG to be automatically started - during device initialization. Note that once IWDG is started - it must be reloaded before the counter reaches 0, otherwise - the MCU will be reset. - config IWDG_STM32_TIMEOUT int "Value for IWDG timeout in [us]" depends on IWDG_STM32 diff --git a/drivers/watchdog/wdt_iwdg_stm32.c b/drivers/watchdog/wdt_iwdg_stm32.c index fb204f0ff1c..6fcadc3fe1d 100644 --- a/drivers/watchdog/wdt_iwdg_stm32.c +++ b/drivers/watchdog/wdt_iwdg_stm32.c @@ -151,7 +151,7 @@ static const struct wdt_driver_api iwdg_stm32_api = { static int iwdg_stm32_init(struct device *dev) { -#ifdef CONFIG_IWDG_STM32_START_AT_BOOT +#ifndef CONFIG_WDT_DISABLE_AT_BOOT IWDG_TypeDef *iwdg = IWDG_STM32_STRUCT(dev); struct wdt_timeout_cfg config = { .window.max = CONFIG_IWDG_STM32_TIMEOUT / USEC_PER_MSEC,