aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/Kconfig2
-rw-r--r--drivers/usb/host/Makefile1
-rw-r--r--drivers/usb/host/ehci-hcd.c6
-rw-r--r--drivers/usb/host/ehci-omap.c76
4 files changed, 37 insertions, 48 deletions
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index c59a1126926f..62f4e9a38557 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -155,7 +155,7 @@ config USB_EHCI_MXC
155 Variation of ARC USB block used in some Freescale chips. 155 Variation of ARC USB block used in some Freescale chips.
156 156
157config USB_EHCI_HCD_OMAP 157config USB_EHCI_HCD_OMAP
158 bool "EHCI support for OMAP3 and later chips" 158 tristate "EHCI support for OMAP3 and later chips"
159 depends on USB_EHCI_HCD && ARCH_OMAP 159 depends on USB_EHCI_HCD && ARCH_OMAP
160 default y 160 default y
161 ---help--- 161 ---help---
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 001fbff2fdef..56de4106c8b3 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -27,6 +27,7 @@ obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
27obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o 27obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
28obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o 28obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o
29obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o 29obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o
30obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o
30 31
31obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o 32obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o
32obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o 33obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index b416a3fc9959..303b0222cd6d 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1252,11 +1252,6 @@ MODULE_LICENSE ("GPL");
1252#define PLATFORM_DRIVER ehci_hcd_sh_driver 1252#define PLATFORM_DRIVER ehci_hcd_sh_driver
1253#endif 1253#endif
1254 1254
1255#ifdef CONFIG_USB_EHCI_HCD_OMAP
1256#include "ehci-omap.c"
1257#define PLATFORM_DRIVER ehci_hcd_omap_driver
1258#endif
1259
1260#ifdef CONFIG_PPC_PS3 1255#ifdef CONFIG_PPC_PS3
1261#include "ehci-ps3.c" 1256#include "ehci-ps3.c"
1262#define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver 1257#define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver
@@ -1346,6 +1341,7 @@ MODULE_LICENSE ("GPL");
1346 !IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \ 1341 !IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \
1347 !IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \ 1342 !IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \
1348 !IS_ENABLED(CONFIG_USB_EHCI_MXC) && \ 1343 !IS_ENABLED(CONFIG_USB_EHCI_MXC) && \
1344 !IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
1349 !defined(PLATFORM_DRIVER) && \ 1345 !defined(PLATFORM_DRIVER) && \
1350 !defined(PS3_SYSTEM_BUS_DRIVER) && \ 1346 !defined(PS3_SYSTEM_BUS_DRIVER) && \
1351 !defined(OF_PLATFORM_DRIVER) && \ 1347 !defined(OF_PLATFORM_DRIVER) && \
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 0555ee42d7cb..fa667577d9b9 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -36,6 +36,9 @@
36 * - convert to use hwmod and runtime PM 36 * - convert to use hwmod and runtime PM
37 */ 37 */
38 38
39#include <linux/kernel.h>
40#include <linux/module.h>
41#include <linux/io.h>
39#include <linux/platform_device.h> 42#include <linux/platform_device.h>
40#include <linux/slab.h> 43#include <linux/slab.h>
41#include <linux/usb/ulpi.h> 44#include <linux/usb/ulpi.h>
@@ -43,6 +46,10 @@
43#include <linux/pm_runtime.h> 46#include <linux/pm_runtime.h>
44#include <linux/gpio.h> 47#include <linux/gpio.h>
45#include <linux/clk.h> 48#include <linux/clk.h>
49#include <linux/usb.h>
50#include <linux/usb/hcd.h>
51
52#include "ehci.h"
46 53
47#include <linux/platform_data/usb-omap.h> 54#include <linux/platform_data/usb-omap.h>
48 55
@@ -57,9 +64,11 @@
57#define EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT 8 64#define EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT 8
58#define EHCI_INSNREG05_ULPI_WRDATA_SHIFT 0 65#define EHCI_INSNREG05_ULPI_WRDATA_SHIFT 0
59 66
60/*-------------------------------------------------------------------------*/ 67#define DRIVER_DESC "OMAP-EHCI Host Controller driver"
61 68
62static const struct hc_driver ehci_omap_hc_driver; 69static const char hcd_name[] = "ehci-omap";
70
71/*-------------------------------------------------------------------------*/
63 72
64 73
65static inline void ehci_write(void __iomem *base, u32 reg, u32 val) 74static inline void ehci_write(void __iomem *base, u32 reg, u32 val)
@@ -166,6 +175,12 @@ static void disable_put_regulator(
166/* configure so an HC device and id are always provided */ 175/* configure so an HC device and id are always provided */
167/* always called with process context; sleeping is OK */ 176/* always called with process context; sleeping is OK */
168 177
178static struct hc_driver __read_mostly ehci_omap_hc_driver;
179
180static const struct ehci_driver_overrides ehci_omap_overrides __initdata = {
181 .reset = omap_ehci_init,
182};
183
169/** 184/**
170 * ehci_hcd_omap_probe - initialize TI-based HCDs 185 * ehci_hcd_omap_probe - initialize TI-based HCDs
171 * 186 *
@@ -315,56 +330,33 @@ static struct platform_driver ehci_hcd_omap_driver = {
315 /*.suspend = ehci_hcd_omap_suspend, */ 330 /*.suspend = ehci_hcd_omap_suspend, */
316 /*.resume = ehci_hcd_omap_resume, */ 331 /*.resume = ehci_hcd_omap_resume, */
317 .driver = { 332 .driver = {
318 .name = "ehci-omap", 333 .name = hcd_name,
319 } 334 }
320}; 335};
321 336
322/*-------------------------------------------------------------------------*/ 337/*-------------------------------------------------------------------------*/
323 338
324static const struct hc_driver ehci_omap_hc_driver = { 339static int __init ehci_omap_init(void)
325 .description = hcd_name, 340{
326 .product_desc = "OMAP-EHCI Host Controller", 341 if (usb_disabled())
327 .hcd_priv_size = sizeof(struct ehci_hcd), 342 return -ENODEV;
328
329 /*
330 * generic hardware linkage
331 */
332 .irq = ehci_irq,
333 .flags = HCD_MEMORY | HCD_USB2,
334
335 /*
336 * basic lifecycle operations
337 */
338 .reset = omap_ehci_init,
339 .start = ehci_run,
340 .stop = ehci_stop,
341 .shutdown = ehci_shutdown,
342
343 /*
344 * managing i/o requests and associated device resources
345 */
346 .urb_enqueue = ehci_urb_enqueue,
347 .urb_dequeue = ehci_urb_dequeue,
348 .endpoint_disable = ehci_endpoint_disable,
349 .endpoint_reset = ehci_endpoint_reset,
350 343
351 /* 344 pr_info("%s: " DRIVER_DESC "\n", hcd_name);
352 * scheduling support
353 */
354 .get_frame_number = ehci_get_frame,
355 345
356 /* 346 ehci_init_driver(&ehci_omap_hc_driver, &ehci_omap_overrides);
357 * root hub support 347 return platform_driver_register(&ehci_hcd_omap_driver);
358 */ 348}
359 .hub_status_data = ehci_hub_status_data, 349module_init(ehci_omap_init);
360 .hub_control = ehci_hub_control,
361 .bus_suspend = ehci_bus_suspend,
362 .bus_resume = ehci_bus_resume,
363 350
364 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, 351static void __exit ehci_omap_cleanup(void)
365}; 352{
353 platform_driver_unregister(&ehci_hcd_omap_driver);
354}
355module_exit(ehci_omap_cleanup);
366 356
367MODULE_ALIAS("platform:ehci-omap"); 357MODULE_ALIAS("platform:ehci-omap");
368MODULE_AUTHOR("Texas Instruments, Inc."); 358MODULE_AUTHOR("Texas Instruments, Inc.");
369MODULE_AUTHOR("Felipe Balbi <felipe.balbi@nokia.com>"); 359MODULE_AUTHOR("Felipe Balbi <felipe.balbi@nokia.com>");
370 360
361MODULE_DESCRIPTION(DRIVER_DESC);
362MODULE_LICENSE("GPL");