Skip to contentSkip to conversation

usb: zynqmp: Add XHCI driver support

PATCH New Siva Durga Prasad Paladugu 2 participants 3 messages Nov 16, 2015 – Nov 17, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v6 1/2 usb: zynqmp: Add XHCI driver support

From: Siva Durga Prasad Paladugu <[email protected]>

Added USB XHCI driver support for zynqmp.

---
Changes for v6:
- Used void* instead of char*
- Define and used variable hclen
to get rid of code duplication
- used %p to print pointers and
avoid tyepcasts.
Changes for v5:
- Removed __board_usb_init() as per
review comment
Changes for v4:
- Added sanity check for index as per
review comment
Changes for v3:
- Decreased the phy reset delay to 10 micro secs
- Defined base addresses in board config file as
per review comment.
Changes for v2:
- Moved all from xhci-zynqmp.h to .c file as
per review comment
- Removed ad-hoc function zynqmp_xhci_core_exit()
as per review comment

---
 drivers/usb/host/Makefile          |    1 +
 drivers/usb/host/xhci-zynqmp.c     |  143 ++++++++++++++++++++++++++++++++++++
 include/configs/xilinx_zynqmp_ep.h |    2 +
 3 files changed, 146 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/host/xhci-zynqmp.c
drivers/usb/host/Makefile +1 -0
index f70f38c..645b990 100644
@@ -54,6 +54,7 @@ obj-$(CONFIG_USB_EHCI_ZYNQ) += ehci-zynq.o
 # xhci
 obj-$(CONFIG_USB_XHCI) += xhci.o xhci-mem.o xhci-ring.o
 obj-$(CONFIG_USB_XHCI_DWC3) += xhci-dwc3.o
+obj-$(CONFIG_USB_XHCI_ZYNQMP) += xhci-zynqmp.o
 obj-$(CONFIG_USB_XHCI_KEYSTONE) += xhci-keystone.o
 obj-$(CONFIG_USB_XHCI_EXYNOS) += xhci-exynos5.o
 obj-$(CONFIG_USB_XHCI_FSL) += xhci-fsl.o
drivers/usb/host/xhci-zynqmp.c new file +143 -0

143 lines not on this page · raw message

include/configs/xilinx_zynqmp_ep.h +2 -0
index ed6023a..1845622 100644
@@ -23,6 +23,8 @@
 #define CONFIG_SYS_I2C_ZYNQ
 #define CONFIG_ZYNQ_EEPROM
 #define CONFIG_AHCI
+#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR, \
+				 ZYNQMP_USB1_XHCI_BASEADDR}
 
 #include <configs/xilinx_zynqmp.h>
 
Signature · 1 line
1.7.1
#1 lore raw

PATCH v6 2/2 usb: zynqmp: Enable USB XHCI support

From: Siva Durga Prasad Paladugu <[email protected]>

Enable USB XHCI support for ZynqMP

---
Changes for v6:
- None
Changes for v5:
- None
Changes for v4:
- None
Changes for v3:
- Removed extra space between # and define
as per review comment
Changes for v2:
- None

---
 include/configs/xilinx_zynqmp.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
include/configs/xilinx_zynqmp.h +8 -0
index 1f17adb..3d388e2 100644
@@ -114,6 +114,14 @@
 #define CONFIG_SYS_LOAD_ADDR		0x8000000
 
 #if defined(CONFIG_ZYNQMP_USB)
+#define CONFIG_USB_XHCI_DWC3
+#define CONFIG_USB_XHCI
+#define CONFIG_USB_MAX_CONTROLLER_COUNT         1
+#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS      2
+#define CONFIG_CMD_USB
+#define CONFIG_USB_STORAGE
+#define CONFIG_USB_XHCI_ZYNQMP
+
 #define CONFIG_USB_DWC3
 #define CONFIG_USB_DWC3_GADGET
 
Signature · 1 line
1.7.1