aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hcd.c
diff options
context:
space:
mode:
authorAnand Gadiyar <gadiyar@ti.com>2010-05-10 12:26:12 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:44 -0400
commit968b448b22f5a42689cc55648510834010d42379 (patch)
treea3ca87f9967959591a9410b9cbebbf395dd80291 /drivers/usb/host/ohci-hcd.c
parent88ed0c97c9e9d48dddeca98856645f6ee5c56489 (diff)
USB: ohci: Add Kconfig entries for ohci-omap3
On OMAP systems, we have two different OHCI controllers. The legacy one is present in OMAP1/2 chips, and the newer one comes bundled as a companion to the EHCI controller on OMAP3 and newer chips. We may have multi-omap configurations where OMAP2 and OMAP3 support may be enabled in the same kernel, and need a mechanism to keep both drivers around. This patch adds a Kconfig entry for each of these drivers. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r--drivers/usb/host/ohci-hcd.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index d15d2478493e..fc576557d8a5 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1006,9 +1006,14 @@ MODULE_LICENSE ("GPL");
1006#define PLATFORM_DRIVER ohci_hcd_s3c2410_driver 1006#define PLATFORM_DRIVER ohci_hcd_s3c2410_driver
1007#endif 1007#endif
1008 1008
1009#ifdef CONFIG_ARCH_OMAP 1009#ifdef CONFIG_USB_OHCI_HCD_OMAP1
1010#include "ohci-omap.c" 1010#include "ohci-omap.c"
1011#define PLATFORM_DRIVER ohci_hcd_omap_driver 1011#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
1012#endif
1013
1014#ifdef CONFIG_USB_OHCI_HCD_OMAP3
1015#include "ohci-omap3.c"
1016#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
1012#endif 1017#endif
1013 1018
1014#ifdef CONFIG_ARCH_LH7A404 1019#ifdef CONFIG_ARCH_LH7A404
@@ -1092,6 +1097,8 @@ MODULE_LICENSE ("GPL");
1092 1097
1093#if !defined(PCI_DRIVER) && \ 1098#if !defined(PCI_DRIVER) && \
1094 !defined(PLATFORM_DRIVER) && \ 1099 !defined(PLATFORM_DRIVER) && \
1100 !defined(OMAP1_PLATFORM_DRIVER) && \
1101 !defined(OMAP3_PLATFORM_DRIVER) && \
1095 !defined(OF_PLATFORM_DRIVER) && \ 1102 !defined(OF_PLATFORM_DRIVER) && \
1096 !defined(SA1111_DRIVER) && \ 1103 !defined(SA1111_DRIVER) && \
1097 !defined(PS3_SYSTEM_BUS_DRIVER) && \ 1104 !defined(PS3_SYSTEM_BUS_DRIVER) && \
@@ -1133,6 +1140,18 @@ static int __init ohci_hcd_mod_init(void)
1133 goto error_platform; 1140 goto error_platform;
1134#endif 1141#endif
1135 1142
1143#ifdef OMAP1_PLATFORM_DRIVER
1144 retval = platform_driver_register(&OMAP1_PLATFORM_DRIVER);
1145 if (retval < 0)
1146 goto error_omap1_platform;
1147#endif
1148
1149#ifdef OMAP3_PLATFORM_DRIVER
1150 retval = platform_driver_register(&OMAP3_PLATFORM_DRIVER);
1151 if (retval < 0)
1152 goto error_omap3_platform;
1153#endif
1154
1136#ifdef OF_PLATFORM_DRIVER 1155#ifdef OF_PLATFORM_DRIVER
1137 retval = of_register_platform_driver(&OF_PLATFORM_DRIVER); 1156 retval = of_register_platform_driver(&OF_PLATFORM_DRIVER);
1138 if (retval < 0) 1157 if (retval < 0)
@@ -1200,6 +1219,14 @@ static int __init ohci_hcd_mod_init(void)
1200 platform_driver_unregister(&PLATFORM_DRIVER); 1219 platform_driver_unregister(&PLATFORM_DRIVER);
1201 error_platform: 1220 error_platform:
1202#endif 1221#endif
1222#ifdef OMAP1_PLATFORM_DRIVER
1223 platform_driver_unregister(&OMAP1_PLATFORM_DRIVER);
1224 error_omap1_platform:
1225#endif
1226#ifdef OMAP3_PLATFORM_DRIVER
1227 platform_driver_unregister(&OMAP3_PLATFORM_DRIVER);
1228 error_omap3_platform:
1229#endif
1203#ifdef PS3_SYSTEM_BUS_DRIVER 1230#ifdef PS3_SYSTEM_BUS_DRIVER
1204 ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); 1231 ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
1205 error_ps3: 1232 error_ps3: