watchdog: Remove CONFIG_WDT_0_NAME usage
Replace CONFIG_WDT_0_NAME with DT_ALIAS_WATCHDOG_0_LABEL in samples and test code. Now that all drivers are DT aware we don't ever set the Kconfig option. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
dc2cb92c4a
commit
f8db0fa2eb
13 changed files with 4 additions and 27 deletions
|
@ -11,16 +11,6 @@ menuconfig WATCHDOG
|
||||||
|
|
||||||
if WATCHDOG
|
if WATCHDOG
|
||||||
|
|
||||||
if !HAS_DTS_WDT
|
|
||||||
|
|
||||||
config WDT_0_NAME
|
|
||||||
string "Watchdog driver instance name"
|
|
||||||
default "WATCHDOG_0"
|
|
||||||
help
|
|
||||||
Set the name used by the watchdog device during registration.
|
|
||||||
|
|
||||||
endif # HAS_DTS_WDT
|
|
||||||
|
|
||||||
config WDT_DISABLE_AT_BOOT
|
config WDT_DISABLE_AT_BOOT
|
||||||
bool "Disable at boot"
|
bool "Disable at boot"
|
||||||
help
|
help
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
#define WDT_FEED_TRIES 5
|
#define WDT_FEED_TRIES 5
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_WDT_0_NAME
|
#ifdef DT_ALIAS_WATCHDOG0_LABEL
|
||||||
#define WDT_DEV_NAME CONFIG_WDT_0_NAME
|
#define WDT_DEV_NAME DT_ALIAS_WATCHDOG0_LABEL
|
||||||
#else
|
#else
|
||||||
#ifdef CONFIG_WWDG_STM32
|
#ifdef CONFIG_WWDG_STM32
|
||||||
#define WDT_DEV_NAME DT_WWDT_0_NAME
|
#define WDT_DEV_NAME DT_WWDT_0_NAME
|
||||||
|
|
|
@ -67,6 +67,5 @@
|
||||||
#define DT_WDT_SAM_IRQ_PRIORITY DT_ATMEL_SAM_WATCHDOG_400E1A50_IRQ_0_PRIORITY
|
#define DT_WDT_SAM_IRQ_PRIORITY DT_ATMEL_SAM_WATCHDOG_400E1A50_IRQ_0_PRIORITY
|
||||||
#define DT_WDT_SAM_LABEL DT_ATMEL_SAM_WATCHDOG_400E1A50_LABEL
|
#define DT_WDT_SAM_LABEL DT_ATMEL_SAM_WATCHDOG_400E1A50_LABEL
|
||||||
#define DT_WDT_SAM_BASE_ADDRESS DT_ATMEL_SAM_WATCHDOG_400E1A50_BASE_ADDRESS
|
#define DT_WDT_SAM_BASE_ADDRESS DT_ATMEL_SAM_WATCHDOG_400E1A50_BASE_ADDRESS
|
||||||
#define CONFIG_WDT_0_NAME DT_WDT_SAM_LABEL
|
|
||||||
|
|
||||||
/* End of SoC Level DTS fixup file */
|
/* End of SoC Level DTS fixup file */
|
||||||
|
|
|
@ -56,5 +56,4 @@
|
||||||
#define DT_WDT_SAM_IRQ_PRIORITY DT_ATMEL_SAM_WATCHDOG_400E1450_IRQ_0_PRIORITY
|
#define DT_WDT_SAM_IRQ_PRIORITY DT_ATMEL_SAM_WATCHDOG_400E1450_IRQ_0_PRIORITY
|
||||||
#define DT_WDT_SAM_LABEL DT_ATMEL_SAM_WATCHDOG_400E1450_LABEL
|
#define DT_WDT_SAM_LABEL DT_ATMEL_SAM_WATCHDOG_400E1450_LABEL
|
||||||
#define DT_WDT_SAM_BASE_ADDRESS DT_ATMEL_SAM_WATCHDOG_400E1450_BASE_ADDRESS
|
#define DT_WDT_SAM_BASE_ADDRESS DT_ATMEL_SAM_WATCHDOG_400E1450_BASE_ADDRESS
|
||||||
#define CONFIG_WDT_0_NAME DT_WDT_SAM_LABEL
|
|
||||||
/* End of SoC Level DTS fixup file */
|
/* End of SoC Level DTS fixup file */
|
||||||
|
|
|
@ -125,7 +125,6 @@
|
||||||
#define DT_WDT_SAM_IRQ_PRIORITY DT_ATMEL_SAM_WATCHDOG_400E1850_IRQ_0_PRIORITY
|
#define DT_WDT_SAM_IRQ_PRIORITY DT_ATMEL_SAM_WATCHDOG_400E1850_IRQ_0_PRIORITY
|
||||||
#define DT_WDT_SAM_LABEL DT_ATMEL_SAM_WATCHDOG_400E1850_LABEL
|
#define DT_WDT_SAM_LABEL DT_ATMEL_SAM_WATCHDOG_400E1850_LABEL
|
||||||
#define DT_WDT_SAM_BASE_ADDRESS DT_ATMEL_SAM_WATCHDOG_400E1850_BASE_ADDRESS
|
#define DT_WDT_SAM_BASE_ADDRESS DT_ATMEL_SAM_WATCHDOG_400E1850_BASE_ADDRESS
|
||||||
#define CONFIG_WDT_0_NAME DT_WDT_SAM_LABEL
|
|
||||||
|
|
||||||
#define DT_USBHS_IRQ DT_ATMEL_SAM_USBHS_40038000_IRQ_0
|
#define DT_USBHS_IRQ DT_ATMEL_SAM_USBHS_40038000_IRQ_0
|
||||||
#define DT_USBHS_IRQ_PRI DT_ATMEL_SAM_USBHS_40038000_IRQ_0_PRIORITY
|
#define DT_USBHS_IRQ_PRI DT_ATMEL_SAM_USBHS_40038000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
#define DT_FLASH_DEV_NAME DT_ATMEL_SAM0_NVMCTRL_41004000_LABEL
|
#define DT_FLASH_DEV_NAME DT_ATMEL_SAM0_NVMCTRL_41004000_LABEL
|
||||||
|
|
||||||
#define CONFIG_WDT_0_NAME DT_INST_0_ATMEL_SAM0_WATCHDOG_LABEL
|
|
||||||
|
|
||||||
#define DT_I2C_0_NAME DT_INST_0_ATMEL_SAM0_I2C_LABEL
|
#define DT_I2C_0_NAME DT_INST_0_ATMEL_SAM0_I2C_LABEL
|
||||||
|
|
||||||
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V6M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V6M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
#define DT_FLASH_DEV_NAME DT_INST_0_ATMEL_SAM0_NVMCTRL_LABEL
|
#define DT_FLASH_DEV_NAME DT_INST_0_ATMEL_SAM0_NVMCTRL_LABEL
|
||||||
|
|
||||||
#define CONFIG_WDT_0_NAME DT_INST_0_ATMEL_SAM0_WATCHDOG_LABEL
|
|
||||||
|
|
||||||
#define DT_I2C_0_NAME DT_INST_0_ATMEL_SAM0_I2C_LABEL
|
#define DT_I2C_0_NAME DT_INST_0_ATMEL_SAM0_I2C_LABEL
|
||||||
|
|
||||||
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V6M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V6M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
#define DT_FLASH_DEV_NAME DT_INST_0_ATMEL_SAM0_NVMCTRL_LABEL
|
#define DT_FLASH_DEV_NAME DT_INST_0_ATMEL_SAM0_NVMCTRL_LABEL
|
||||||
|
|
||||||
#define CONFIG_WDT_0_NAME DT_INST_0_ATMEL_SAM0_WATCHDOG_LABEL
|
|
||||||
|
|
||||||
#define DT_I2C_0_NAME DT_INST_0_ATMEL_SAM0_I2C_LABEL
|
#define DT_I2C_0_NAME DT_INST_0_ATMEL_SAM0_I2C_LABEL
|
||||||
|
|
||||||
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V6M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V6M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
||||||
|
|
|
@ -64,7 +64,6 @@
|
||||||
#define DT_FLASH_DEV_BASE_ADDRESS DT_NXP_KINETIS_FTFE_40020000_BASE_ADDRESS
|
#define DT_FLASH_DEV_BASE_ADDRESS DT_NXP_KINETIS_FTFE_40020000_BASE_ADDRESS
|
||||||
#define DT_FLASH_DEV_NAME DT_NXP_KINETIS_FTFE_40020000_LABEL
|
#define DT_FLASH_DEV_NAME DT_NXP_KINETIS_FTFE_40020000_LABEL
|
||||||
|
|
||||||
#define CONFIG_WDT_0_NAME DT_NXP_KINETIS_WDOG_40052000_LABEL
|
|
||||||
#define DT_WDT_0_BASE_ADDRESS DT_NXP_KINETIS_WDOG_40052000_BASE_ADDRESS
|
#define DT_WDT_0_BASE_ADDRESS DT_NXP_KINETIS_WDOG_40052000_BASE_ADDRESS
|
||||||
#define DT_WDT_0_IRQ DT_NXP_KINETIS_WDOG_40052000_IRQ_0
|
#define DT_WDT_0_IRQ DT_NXP_KINETIS_WDOG_40052000_IRQ_0
|
||||||
#define DT_WDT_0_IRQ_PRI DT_NXP_KINETIS_WDOG_40052000_IRQ_0_PRIORITY
|
#define DT_WDT_0_IRQ_PRI DT_NXP_KINETIS_WDOG_40052000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -100,7 +100,6 @@
|
||||||
#define DT_FLASH_DEV_BASE_ADDRESS DT_NXP_KINETIS_FTFE_40020000_BASE_ADDRESS
|
#define DT_FLASH_DEV_BASE_ADDRESS DT_NXP_KINETIS_FTFE_40020000_BASE_ADDRESS
|
||||||
#define DT_FLASH_DEV_NAME DT_NXP_KINETIS_FTFE_40020000_LABEL
|
#define DT_FLASH_DEV_NAME DT_NXP_KINETIS_FTFE_40020000_LABEL
|
||||||
|
|
||||||
#define CONFIG_WDT_0_NAME DT_NXP_KINETIS_WDOG_40052000_LABEL
|
|
||||||
#define DT_WDT_0_BASE_ADDRESS DT_NXP_KINETIS_WDOG_40052000_BASE_ADDRESS
|
#define DT_WDT_0_BASE_ADDRESS DT_NXP_KINETIS_WDOG_40052000_BASE_ADDRESS
|
||||||
#define DT_WDT_0_IRQ DT_NXP_KINETIS_WDOG_40052000_IRQ_0
|
#define DT_WDT_0_IRQ DT_NXP_KINETIS_WDOG_40052000_IRQ_0
|
||||||
#define DT_WDT_0_IRQ_PRI DT_NXP_KINETIS_WDOG_40052000_IRQ_0_PRIORITY
|
#define DT_WDT_0_IRQ_PRI DT_NXP_KINETIS_WDOG_40052000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -156,7 +156,6 @@
|
||||||
#define DT_USBD_KINETIS_BASE_ADDRESS DT_NXP_KINETIS_USBD_40072000_BASE_ADDRESS
|
#define DT_USBD_KINETIS_BASE_ADDRESS DT_NXP_KINETIS_USBD_40072000_BASE_ADDRESS
|
||||||
#define DT_USBD_KINETIS_NUM_BIDIR_EP DT_NXP_KINETIS_USBD_40072000_NUM_BIDIR_ENDPOINTS
|
#define DT_USBD_KINETIS_NUM_BIDIR_EP DT_NXP_KINETIS_USBD_40072000_NUM_BIDIR_ENDPOINTS
|
||||||
|
|
||||||
#define CONFIG_WDT_0_NAME DT_NXP_KINETIS_WDOG_40052000_LABEL
|
|
||||||
#define DT_WDT_0_BASE_ADDRESS DT_NXP_KINETIS_WDOG_40052000_BASE_ADDRESS
|
#define DT_WDT_0_BASE_ADDRESS DT_NXP_KINETIS_WDOG_40052000_BASE_ADDRESS
|
||||||
#define DT_WDT_0_IRQ DT_NXP_KINETIS_WDOG_40052000_IRQ_0
|
#define DT_WDT_0_IRQ DT_NXP_KINETIS_WDOG_40052000_IRQ_0
|
||||||
#define DT_WDT_0_IRQ_PRI DT_NXP_KINETIS_WDOG_40052000_IRQ_0_PRIORITY
|
#define DT_WDT_0_IRQ_PRI DT_NXP_KINETIS_WDOG_40052000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -82,7 +82,6 @@
|
||||||
#define DT_FLASH_DEV_BASE_ADDRESS DT_NXP_KINETIS_FTFL_40020000_BASE_ADDRESS
|
#define DT_FLASH_DEV_BASE_ADDRESS DT_NXP_KINETIS_FTFL_40020000_BASE_ADDRESS
|
||||||
#define DT_FLASH_DEV_NAME DT_NXP_KINETIS_FTFL_40020000_LABEL
|
#define DT_FLASH_DEV_NAME DT_NXP_KINETIS_FTFL_40020000_LABEL
|
||||||
|
|
||||||
#define CONFIG_WDT_0_NAME DT_NXP_KINETIS_WDOG_40052000_LABEL
|
|
||||||
#define DT_WDT_0_BASE_ADDRESS DT_NXP_KINETIS_WDOG_40052000_BASE_ADDRESS
|
#define DT_WDT_0_BASE_ADDRESS DT_NXP_KINETIS_WDOG_40052000_BASE_ADDRESS
|
||||||
#define DT_WDT_0_IRQ DT_NXP_KINETIS_WDOG_40052000_IRQ_0
|
#define DT_WDT_0_IRQ DT_NXP_KINETIS_WDOG_40052000_IRQ_0
|
||||||
#define DT_WDT_0_IRQ_PRI DT_NXP_KINETIS_WDOG_40052000_IRQ_0_PRIORITY
|
#define DT_WDT_0_IRQ_PRI DT_NXP_KINETIS_WDOG_40052000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -62,8 +62,8 @@
|
||||||
#include <ztest.h>
|
#include <ztest.h>
|
||||||
#include "test_wdt.h"
|
#include "test_wdt.h"
|
||||||
|
|
||||||
#ifdef CONFIG_WDT_0_NAME
|
#ifdef DT_ALIAS_WATCHDOG0_LABEL
|
||||||
#define WDT_DEV_NAME CONFIG_WDT_0_NAME
|
#define WDT_DEV_NAME DT_ALIAS_WATCHDOG0_LABEL
|
||||||
#else
|
#else
|
||||||
#ifdef CONFIG_WWDG_STM32
|
#ifdef CONFIG_WWDG_STM32
|
||||||
#define WDT_DEV_NAME DT_WWDT_0_NAME
|
#define WDT_DEV_NAME DT_WWDT_0_NAME
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue