drivers/usb: Switching to DTS based configuration for DW driver
And applying the changes to intel_s1000_crb board as well. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
1925b501a8
commit
b8e14b5b9d
5 changed files with 12 additions and 16 deletions
|
@ -61,9 +61,6 @@ if USB
|
|||
config USB_DW
|
||||
default y
|
||||
|
||||
config USB_DW_IRQ_PRI
|
||||
default 3
|
||||
|
||||
config USB_DW_USB_2_0
|
||||
default y
|
||||
|
||||
|
|
|
@ -95,3 +95,7 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -14,12 +14,6 @@ config USB_DW
|
|||
help
|
||||
Designware USB Device Controller Driver.
|
||||
|
||||
config USB_DW_IRQ_PRI
|
||||
int "DesignWare USB Driver Interrupt priority"
|
||||
depends on USB_DW
|
||||
help
|
||||
USB interrupt priority.
|
||||
|
||||
config USB_DW_USB_2_0
|
||||
bool "DesignWare Controller and PHY support for USB specification 2.0"
|
||||
depends on USB_DW
|
||||
|
|
|
@ -721,9 +721,9 @@ int usb_dc_attach(void)
|
|||
}
|
||||
|
||||
/* Connect and enable USB interrupt */
|
||||
IRQ_CONNECT(USB_DW_IRQ, CONFIG_USB_DW_IRQ_PRI,
|
||||
usb_dw_isr_handler, 0, IOAPIC_EDGE | IOAPIC_HIGH);
|
||||
irq_enable(USB_DW_IRQ);
|
||||
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);
|
||||
|
||||
usb_dw_ctrl.attached = 1U;
|
||||
|
||||
|
@ -736,7 +736,7 @@ int usb_dc_detach(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
irq_disable(USB_DW_IRQ);
|
||||
irq_disable(DT_USB_DW_0_IRQ);
|
||||
|
||||
/* Enable soft disconnect */
|
||||
USB_DW->dctl |= USB_DW_DCTL_SFT_DISCON;
|
||||
|
|
|
@ -22,7 +22,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* Number of USB controllers */
|
||||
enum USB_DW { USB_DW_0 = 0, USB_DW_NUM };
|
||||
enum USB_DW_N { USB_DW_0 = 0, USB_DW_NUM };
|
||||
|
||||
/* USB IN EP index */
|
||||
enum usb_dw_in_ep_idx {
|
||||
|
@ -197,9 +197,10 @@ struct usb_dw_reg {
|
|||
#define USB_DW_CORE_RST_TIMEOUT_US 10000
|
||||
#define USB_DW_PLL_TIMEOUT_US 100
|
||||
|
||||
#define USB_DW_EP_FIFO(ep) (*(u32_t *)(USB_DW_BASE + 0x1000 * (ep + 1)))
|
||||
#define USB_DW_EP_FIFO(ep) \
|
||||
(*(u32_t *)(DT_USB_DW_0_BASE_ADDRESS + 0x1000 * (ep + 1)))
|
||||
/* USB register block base address */
|
||||
#define USB_DW ((struct usb_dw_reg *)USB_DW_BASE)
|
||||
#define USB_DW ((struct usb_dw_reg *)DT_USB_DW_0_BASE_ADDRESS)
|
||||
|
||||
#define DW_USB_IN_EP_NUM (6)
|
||||
#define DW_USB_OUT_EP_NUM (4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue