|
|
@ -283,13 +283,20 @@ int checkboard(void) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_USB_DWC3 |
|
|
|
#ifdef CONFIG_USB_DWC3 |
|
|
|
static struct dwc3_device dwc3_device_data = { |
|
|
|
static struct dwc3_device dwc3_device_data0 = { |
|
|
|
.maximum_speed = USB_SPEED_HIGH, |
|
|
|
.maximum_speed = USB_SPEED_HIGH, |
|
|
|
.base = ZYNQMP_USB0_XHCI_BASEADDR, |
|
|
|
.base = ZYNQMP_USB0_XHCI_BASEADDR, |
|
|
|
.dr_mode = USB_DR_MODE_PERIPHERAL, |
|
|
|
.dr_mode = USB_DR_MODE_PERIPHERAL, |
|
|
|
.index = 0, |
|
|
|
.index = 0, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static struct dwc3_device dwc3_device_data1 = { |
|
|
|
|
|
|
|
.maximum_speed = USB_SPEED_HIGH, |
|
|
|
|
|
|
|
.base = ZYNQMP_USB1_XHCI_BASEADDR, |
|
|
|
|
|
|
|
.dr_mode = USB_DR_MODE_PERIPHERAL, |
|
|
|
|
|
|
|
.index = 1, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
int usb_gadget_handle_interrupts(void) |
|
|
|
int usb_gadget_handle_interrupts(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
dwc3_uboot_handle_interrupt(0); |
|
|
|
dwc3_uboot_handle_interrupt(0); |
|
|
@ -298,7 +305,16 @@ int usb_gadget_handle_interrupts(void) |
|
|
|
|
|
|
|
|
|
|
|
int board_usb_init(int index, enum usb_init_type init) |
|
|
|
int board_usb_init(int index, enum usb_init_type init) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return dwc3_uboot_init(&dwc3_device_data); |
|
|
|
debug("%s: index %x\n", __func__, index); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (index) { |
|
|
|
|
|
|
|
case 0: |
|
|
|
|
|
|
|
return dwc3_uboot_init(&dwc3_device_data0); |
|
|
|
|
|
|
|
case 1: |
|
|
|
|
|
|
|
return dwc3_uboot_init(&dwc3_device_data1); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int board_usb_cleanup(int index, enum usb_init_type init) |
|
|
|
int board_usb_cleanup(int index, enum usb_init_type init) |
|
|
|