aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
authorAlek Du <alek.du@intel.com>2010-12-09 10:37:41 +0000
committerAlan Cox <alan@linux.intel.com>2010-12-09 10:37:41 +0000
commit6be72e9b54479e7a2c473bc6cc778319e5f925e3 (patch)
tree00735e849a556a9b840059df654de80af040db97 /drivers/usb/host/ehci-hcd.c
parent313db3b6702f31eed174bff7104c6126c518f51e (diff)
downloadmrst-s0i3-test-6be72e9b54479e7a2c473bc6cc778319e5f925e3.tar.gz
mrst-s0i3-test-6be72e9b54479e7a2c473bc6cc778319e5f925e3.tar.xz
mrst-s0i3-test-6be72e9b54479e7a2c473bc6cc778319e5f925e3.zip
ehci: Support for Intel Moorestown MPH and OTG host
The Intel Moorestown platform has EHCI MPH and EHCI OTG host. This patch adds PCI probe part for them. The HNP part and SRAM part will be added in another patch. This patch depends on the OTG transceive and OTG client patch from Hang Yuan that should be accepted already. Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index e9062806d4a..c59361e6e91 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -43,6 +43,8 @@
#include <asm/irq.h>
#include <asm/system.h>
#include <asm/unaligned.h>
+#include <linux/usb/otg.h>
+#include <linux/usb/langwell_otg.h>
/*-------------------------------------------------------------------------*/
@@ -1154,6 +1156,10 @@ MODULE_LICENSE ("GPL");
#ifdef CONFIG_PCI
#include "ehci-pci.c"
#define PCI_DRIVER ehci_pci_driver
+#ifdef CONFIG_USB_LANGWELL_OTG
+#include "ehci-langwell-pci.c"
+#define LNW_OTG_HOST_DRIVER ehci_otg_driver
+#endif
#endif
#ifdef CONFIG_USB_EHCI_FSL
@@ -1278,8 +1284,18 @@ static int __init ehci_hcd_init(void)
if (retval < 0)
goto clean4;
#endif
+
+#ifdef LNW_OTG_HOST_DRIVER
+ retval = langwell_register_host(&LNW_OTG_HOST_DRIVER);
+ if (retval < 0)
+ goto clean5;
+#endif
return retval;
+#ifdef LNW_OTG_HOST_DRIVER
+clean5:
+ langwell_unregister_host(&LNW_OTG_HOST_DRIVER);
+#endif
#ifdef XILINX_OF_PLATFORM_DRIVER
/* of_unregister_platform_driver(&XILINX_OF_PLATFORM_DRIVER); */
clean4:
@@ -1312,6 +1328,9 @@ module_init(ehci_hcd_init);
static void __exit ehci_hcd_cleanup(void)
{
+#ifdef LNW_OTG_HOST_DRIVER
+ langwell_unregister_host(&LNW_OTG_HOST_DRIVER);
+#endif
#ifdef XILINX_OF_PLATFORM_DRIVER
of_unregister_platform_driver(&XILINX_OF_PLATFORM_DRIVER);
#endif