diff options
author | Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> | 2015-08-04 07:33:26 (GMT) |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2015-08-19 09:27:30 (GMT) |
commit | 16fa00a71147de0fb87062f912478a0551d148d3 (patch) | |
tree | 6e50cfecf80f86e61e3a345d7628b51135a3b25f /board | |
parent | ff560a13056a565a4e9ce1761bd04276a3cace88 (diff) | |
download | u-boot-fsl-qoriq-16fa00a71147de0fb87062f912478a0551d148d3.tar.xz |
zynqmp: usb: Add usb dwc3 driver support for zynqmp
Added usb dwc3 driver support for zynqmp
this also supports the DFU and LTHOR to download
the linux images on to RAM and cen be booted from
those linux images.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index ffb3a58..d105bb4 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -12,6 +12,8 @@ #include <asm/arch/hardware.h> #include <asm/arch/sys_proto.h> #include <asm/io.h> +#include <usb.h> +#include <dwc3-uboot.h> DECLARE_GLOBAL_DATA_PTR; @@ -136,3 +138,29 @@ int checkboard(void) puts("Board:\tXilinx ZynqMP\n"); return 0; } + +#ifdef CONFIG_USB_DWC3 +static struct dwc3_device dwc3_device_data = { + .maximum_speed = USB_SPEED_HIGH, + .base = ZYNQMP_USB0_XHCI_BASEADDR, + .dr_mode = USB_DR_MODE_PERIPHERAL, + .index = 0, +}; + +int usb_gadget_handle_interrupts(void) +{ + dwc3_uboot_handle_interrupt(0); + return 0; +} + +int board_usb_init(int index, enum usb_init_type init) +{ + return dwc3_uboot_init(&dwc3_device_data); +} + +int board_usb_cleanup(int index, enum usb_init_type init) +{ + dwc3_uboot_exit(index); + return 0; +} +#endif |