drivers: watchdog: Convert Atmel SAM driver to DTS

The majority of bits where already in place, but some minor support
get the driver name from DTS was needed.  Now we select HAS_DTS_WDT
for the driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2018-11-14 09:23:40 -06:00 committed by Kumar Gala
parent 5e6f220713
commit ee9b08d7da
5 changed files with 5 additions and 1 deletions

View file

@ -8,6 +8,7 @@
menuconfig WDT_SAM
bool "Atmel SAM MCU Family Watchdog (WDT) Driver"
depends on SOC_FAMILY_SAM
select HAS_DTS_WDT
default y
help
Enable WDT driver for Atmel SAM MCUs.

View file

@ -249,6 +249,6 @@ static int wdt_sam_init(struct device *dev)
return 0;
}
DEVICE_AND_API_INIT(wdt_sam, CONFIG_WDT_0_NAME, wdt_sam_init,
DEVICE_AND_API_INIT(wdt_sam, DT_WDT_SAM_LABEL, wdt_sam_init,
&wdt_sam_data, &wdt_sam_cfg, PRE_KERNEL_1,
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &wdt_sam_api);

View file

@ -39,5 +39,6 @@
#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_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 */

View file

@ -54,4 +54,5 @@
#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_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 */

View file

@ -120,6 +120,7 @@
#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_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_PRI DT_ATMEL_SAM_USBHS_40038000_IRQ_0_PRIORITY