drivers: usb: usb_dw: convert to DT_INST defines
Convert driver to use DT_INST_ defines. The preferred defines for drivers are DT_INST_. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
f91b4dbe94
commit
0c7a5fdf1c
3 changed files with 8 additions and 18 deletions
|
@ -723,9 +723,11 @@ int usb_dc_attach(void)
|
|||
}
|
||||
|
||||
/* Connect and enable USB interrupt */
|
||||
IRQ_CONNECT(DT_USB_DW_0_IRQ, DT_USB_DW_0_IRQ_PRI,
|
||||
usb_dw_isr_handler, 0, DT_USB_DW_0_IRQ_FLAGS);
|
||||
irq_enable(DT_USB_DW_0_IRQ);
|
||||
IRQ_CONNECT(DT_INST_0_SNPS_DESIGNWARE_USB_IRQ_0,
|
||||
DT_INST_0_SNPS_DESIGNWARE_USB_IRQ_0_PRIORITY,
|
||||
usb_dw_isr_handler, 0,
|
||||
DT_INST_0_SNPS_DESIGNWARE_USB_IRQ_0_SENSE);
|
||||
irq_enable(DT_INST_0_SNPS_DESIGNWARE_USB_IRQ_0);
|
||||
|
||||
usb_dw_ctrl.attached = 1U;
|
||||
|
||||
|
@ -738,7 +740,7 @@ int usb_dc_detach(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
irq_disable(DT_USB_DW_0_IRQ);
|
||||
irq_disable(DT_INST_0_SNPS_DESIGNWARE_USB_IRQ_0);
|
||||
|
||||
/* Enable soft disconnect */
|
||||
USB_DW->dctl |= USB_DW_DCTL_SFT_DISCON;
|
||||
|
|
|
@ -198,9 +198,9 @@ struct usb_dw_reg {
|
|||
#define USB_DW_PLL_TIMEOUT_US 100
|
||||
|
||||
#define USB_DW_EP_FIFO(ep) \
|
||||
(*(u32_t *)(DT_USB_DW_0_BASE_ADDRESS + 0x1000 * (ep + 1)))
|
||||
(*(u32_t *)(DT_INST_0_SNPS_DESIGNWARE_USB_BASE_ADDRESS + 0x1000 * (ep + 1)))
|
||||
/* USB register block base address */
|
||||
#define USB_DW ((struct usb_dw_reg *)DT_USB_DW_0_BASE_ADDRESS)
|
||||
#define USB_DW ((struct usb_dw_reg *)DT_INST_0_SNPS_DESIGNWARE_USB_BASE_ADDRESS)
|
||||
|
||||
#define DW_USB_IN_EP_NUM (6)
|
||||
#define DW_USB_OUT_EP_NUM (4)
|
||||
|
|
|
@ -75,16 +75,4 @@
|
|||
#define DT_PINMUX_CTRL_REG_COUNT \
|
||||
(DT_INTEL_S1000_PINMUX_81C30_SIZE / 4)
|
||||
|
||||
/*
|
||||
* USB configuration
|
||||
*/
|
||||
#define DT_USB_DW_0_BASE_ADDRESS \
|
||||
DT_SNPS_DESIGNWARE_USB_A0000_BASE_ADDRESS
|
||||
#define DT_USB_DW_0_NAME DT_SNPS_DESIGNWARE_USB_A0000_LABEL
|
||||
#define DT_USB_DW_0_IRQ DT_SNPS_DESIGNWARE_USB_A0000_IRQ_0
|
||||
#define DT_USB_DW_0_IRQ_PRI \
|
||||
DT_SNPS_DESIGNWARE_USB_A0000_IRQ_0_PRIORITY
|
||||
#define DT_USB_DW_0_IRQ_FLAGS \
|
||||
DT_SNPS_DESIGNWARE_USB_A0000_IRQ_0_SENSE
|
||||
|
||||
/* End of SoC Level DTS fixup file */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue