drivers: watchdog: sam: convert to DT_INST defines
Convert driver to use DT_INST_ defines. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
76e0cf63b3
commit
70d78412f7
6 changed files with 5 additions and 31 deletions
|
@ -228,15 +228,15 @@ static const struct wdt_driver_api wdt_sam_api = {
|
|||
};
|
||||
|
||||
static const struct wdt_sam_dev_cfg wdt_sam_cfg = {
|
||||
.regs = (Wdt *)DT_WDT_SAM_BASE_ADDRESS,
|
||||
.regs = (Wdt *)DT_INST_0_ATMEL_SAM_WATCHDOG_BASE_ADDRESS,
|
||||
};
|
||||
|
||||
static void wdt_sam_irq_config(void)
|
||||
{
|
||||
IRQ_CONNECT(DT_WDT_SAM_IRQ,
|
||||
DT_WDT_SAM_IRQ_PRIORITY, wdt_sam_isr,
|
||||
IRQ_CONNECT(DT_INST_0_ATMEL_SAM_WATCHDOG_IRQ_0,
|
||||
DT_INST_0_ATMEL_SAM_WATCHDOG_IRQ_0_PRIORITY, wdt_sam_isr,
|
||||
DEVICE_GET(wdt_sam), 0);
|
||||
irq_enable(DT_WDT_SAM_IRQ);
|
||||
irq_enable(DT_INST_0_ATMEL_SAM_WATCHDOG_IRQ_0);
|
||||
}
|
||||
|
||||
static int wdt_sam_init(struct device *dev)
|
||||
|
@ -249,6 +249,6 @@ static int wdt_sam_init(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEVICE_AND_API_INIT(wdt_sam, DT_WDT_SAM_LABEL, wdt_sam_init,
|
||||
DEVICE_AND_API_INIT(wdt_sam, DT_INST_0_ATMEL_SAM_WATCHDOG_LABEL, wdt_sam_init,
|
||||
&wdt_sam_data, &wdt_sam_cfg, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &wdt_sam_api);
|
||||
|
|
|
@ -63,11 +63,6 @@
|
|||
#define DT_USART_SAM_PORT_3_NAME DT_ATMEL_SAM_USART_400A4000_LABEL
|
||||
#define DT_USART_SAM_PORT_3_BAUD_RATE DT_ATMEL_SAM_USART_400A4000_CURRENT_SPEED
|
||||
|
||||
#define DT_WDT_SAM_IRQ DT_ATMEL_SAM_WATCHDOG_400E1A50_IRQ_0
|
||||
#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 DT_FLASH_DEV_BASE_ADDRESS DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_BASE_ADDRESS
|
||||
#define DT_FLASH_DEV_NAME DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_LABEL
|
||||
|
||||
|
|
|
@ -78,11 +78,6 @@
|
|||
#define DT_USART_SAM_PORT_1_IRQ_PRIO DT_ATMEL_SAM_USART_400A4000_IRQ_0_PRIORITY
|
||||
#define DT_USART_SAM_PORT_1_PERIPHERAL_ID DT_ATMEL_SAM_USART_400A4000_PERIPHERAL_ID
|
||||
|
||||
#define DT_WDT_SAM_IRQ DT_ATMEL_SAM_WATCHDOG_400E1850_IRQ_0
|
||||
#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 DT_FLASH_DEV_BASE_ADDRESS DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_BASE_ADDRESS
|
||||
#define DT_FLASH_DEV_NAME DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_LABEL
|
||||
/* End of SoC Level DTS fixup file */
|
||||
|
|
|
@ -69,11 +69,6 @@
|
|||
#define DT_USART_SAM_PORT_1_IRQ_PRIO DT_ATMEL_SAM_USART_40028000_IRQ_0_PRIORITY
|
||||
#define DT_USART_SAM_PORT_1_PERIPHERAL_ID DT_ATMEL_SAM_USART_40028000_PERIPHERAL_ID
|
||||
|
||||
#define DT_WDT_SAM_IRQ DT_ATMEL_SAM_WATCHDOG_400E1450_IRQ_0
|
||||
#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 DT_FLASH_DEV_BASE_ADDRESS DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_BASE_ADDRESS
|
||||
#define DT_FLASH_DEV_NAME DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_LABEL
|
||||
/* End of SoC Level DTS fixup file */
|
||||
|
|
|
@ -120,12 +120,6 @@
|
|||
#define DT_ADC_1_NAME DT_ATMEL_SAM_AFEC_40064000_LABEL
|
||||
#define DT_ADC_1_PERIPHERAL_ID DT_ATMEL_SAM_AFEC_40064000_PERIPHERAL_ID
|
||||
|
||||
|
||||
#define DT_WDT_SAM_IRQ DT_ATMEL_SAM_WATCHDOG_400E1850_IRQ_0
|
||||
#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 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_MAXIMUM_SPEED DT_ATMEL_SAM_USBHS_40038000_MAXIMUM_SPEED
|
||||
|
|
|
@ -125,11 +125,6 @@
|
|||
#define DT_ADC_1_NAME DT_ATMEL_SAM_AFEC_40064000_LABEL
|
||||
#define DT_ADC_1_PERIPHERAL_ID DT_ATMEL_SAM_AFEC_40064000_PERIPHERAL_ID
|
||||
|
||||
#define DT_WDT_SAM_IRQ DT_ATMEL_SAM_WATCHDOG_400E1850_IRQ_0
|
||||
#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 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_MAXIMUM_SPEED DT_ATMEL_SAM_USBHS_40038000_MAXIMUM_SPEED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue