Skip to contentSkip to conversation

USB: pxa168: Add onchip USB host controller support

PATCH New Tanmay Upadhyay 1 participant 1 message Jul 20, 2011 1 message not in the archive

Subsystems (5)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/1 USB: pxa168: Add onchip USB host controller support

- Add EHCI Host controller driver
- Add wrapper that creates resources for host controller driver

v2 - Call clk_put() after clk_disable() in probe function

---
 arch/arm/mach-mmp/include/mach/pxa168.h |    7 +
 arch/arm/mach-mmp/pxa168.c              |   46 ++++
 drivers/usb/Kconfig                     |    1 +
 drivers/usb/host/Kconfig                |    7 +
 drivers/usb/host/ehci-hcd.c             |    5 +
 drivers/usb/host/ehci-pxa168.c          |  363 +++++++++++++++++++++++++++++++
 6 files changed, 429 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/host/ehci-pxa168.c
arch/arm/mach-mmp/include/mach/pxa168.h +7 -0
index 7f00584..7fb568d 100644
@@ -35,6 +35,13 @@ extern struct pxa_device_desc pxa168_device_fb;
 extern struct pxa_device_desc pxa168_device_keypad;
 extern struct pxa_device_desc pxa168_device_eth;
 
+struct pxa168_usb_pdata {
+	/* If NULL, default phy init routine for PXA168 would be called */
+	int (*phy_init)(void __iomem *usb_phy_reg_base);
+};
+/* pdata can be NULL */
+int __init pxa168_add_usb_host(struct pxa168_usb_pdata *pdata);
+
 static inline int pxa168_add_uart(int id)
 {
 	struct pxa_device_desc *d = NULL;
arch/arm/mach-mmp/pxa168.c +46 -0

67 lines not on this page · raw message

drivers/usb/Kconfig +1 -0
index 006489d..3121d41 100644
@@ -67,6 +67,7 @@ config USB_ARCH_HAS_EHCI
 	default y if PLAT_SPEAR
 	default y if ARCH_MSM
 	default y if MICROBLAZE
+	default y if ARCH_MMP
 	default PCI
 
 # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
drivers/usb/host/Kconfig +7 -0
index e0e0787..130738d 100644
@@ -529,3 +529,10 @@ config USB_OCTEON_OHCI
 config USB_OCTEON2_COMMON
 	bool
 	default y if USB_OCTEON_EHCI || USB_OCTEON_OHCI
+
+config USB_PXA168_EHCI
+	bool "Marvell PXA168 on-chip EHCI HCD support"
+	depends on USB_EHCI_HCD && ARCH_MMP
+	help
+	  Enable support for Marvell PXA168 SoC's on-chip EHCI
+	  host controller
drivers/usb/host/ehci-hcd.c +5 -0
index 78561d1..1c49b26 100644
@@ -1265,6 +1265,11 @@ MODULE_LICENSE ("GPL");
 #define PLATFORM_DRIVER		tegra_ehci_driver
 #endif
 
+#ifdef CONFIG_USB_PXA168_EHCI
+#include "ehci-pxa168.c"
+#define PLATFORM_DRIVER		ehci_pxa168_driver
+#endif
+
 #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
     !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) && \
     !defined(XILINX_OF_PLATFORM_DRIVER)
drivers/usb/host/ehci-pxa168.c new file +363 -0

363 lines not on this page · raw message

Signature · 1 line
1.7.0.4