aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hcd.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2008-10-08 08:14:23 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-22 13:05:27 -0400
commit78c73414f4f6744e2ea5a07b263a9698aa6f2416 (patch)
tree8125e4ad420d0fc4a86c9319c7f51c168a0cf6a2 /drivers/usb/host/ohci-hcd.c
parent2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff)
USB: ohci: add support for tmio-ohci cell
Some Toshiba Mobile I/O chips have OHCI controller built in. E.g. the tc6393xb chip found in several Toshiba e-Series PDAs and in Sharp Zaurus SL-6000 PDA. This adds platform glue to support OHCI function of the chip. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Acked-by: Ian Molton <spyro@f2s.com> Cc: Ian Molton <spyro@f2s.com> 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.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 8647dab0d7f9..8aa3f4556a32 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1075,12 +1075,18 @@ MODULE_LICENSE ("GPL");
1075#define SM501_OHCI_DRIVER ohci_hcd_sm501_driver 1075#define SM501_OHCI_DRIVER ohci_hcd_sm501_driver
1076#endif 1076#endif
1077 1077
1078#ifdef CONFIG_MFD_TC6393XB
1079#include "ohci-tmio.c"
1080#define TMIO_OHCI_DRIVER ohci_hcd_tmio_driver
1081#endif
1082
1078#if !defined(PCI_DRIVER) && \ 1083#if !defined(PCI_DRIVER) && \
1079 !defined(PLATFORM_DRIVER) && \ 1084 !defined(PLATFORM_DRIVER) && \
1080 !defined(OF_PLATFORM_DRIVER) && \ 1085 !defined(OF_PLATFORM_DRIVER) && \
1081 !defined(SA1111_DRIVER) && \ 1086 !defined(SA1111_DRIVER) && \
1082 !defined(PS3_SYSTEM_BUS_DRIVER) && \ 1087 !defined(PS3_SYSTEM_BUS_DRIVER) && \
1083 !defined(SM501_OHCI_DRIVER) && \ 1088 !defined(SM501_OHCI_DRIVER) && \
1089 !defined(TMIO_OHCI_DRIVER) && \
1084 !defined(SSB_OHCI_DRIVER) 1090 !defined(SSB_OHCI_DRIVER)
1085#error "missing bus glue for ohci-hcd" 1091#error "missing bus glue for ohci-hcd"
1086#endif 1092#endif
@@ -1147,13 +1153,25 @@ static int __init ohci_hcd_mod_init(void)
1147 goto error_sm501; 1153 goto error_sm501;
1148#endif 1154#endif
1149 1155
1156#ifdef TMIO_OHCI_DRIVER
1157 retval = platform_driver_register(&TMIO_OHCI_DRIVER);
1158 if (retval < 0)
1159 goto error_tmio;
1160#endif
1161
1150 return retval; 1162 return retval;
1151 1163
1152 /* Error path */ 1164 /* Error path */
1165#ifdef TMIO_OHCI_DRIVER
1166 platform_driver_unregister(&TMIO_OHCI_DRIVER);
1167 error_tmio:
1168#endif
1153#ifdef SM501_OHCI_DRIVER 1169#ifdef SM501_OHCI_DRIVER
1170 platform_driver_unregister(&SM501_OHCI_DRIVER);
1154 error_sm501: 1171 error_sm501:
1155#endif 1172#endif
1156#ifdef SSB_OHCI_DRIVER 1173#ifdef SSB_OHCI_DRIVER
1174 ssb_driver_unregister(&SSB_OHCI_DRIVER);
1157 error_ssb: 1175 error_ssb:
1158#endif 1176#endif
1159#ifdef PCI_DRIVER 1177#ifdef PCI_DRIVER
@@ -1189,6 +1207,9 @@ module_init(ohci_hcd_mod_init);
1189 1207
1190static void __exit ohci_hcd_mod_exit(void) 1208static void __exit ohci_hcd_mod_exit(void)
1191{ 1209{
1210#ifdef TMIO_OHCI_DRIVER
1211 platform_driver_unregister(&TMIO_OHCI_DRIVER);
1212#endif
1192#ifdef SM501_OHCI_DRIVER 1213#ifdef SM501_OHCI_DRIVER
1193 platform_driver_unregister(&SM501_OHCI_DRIVER); 1214 platform_driver_unregister(&SM501_OHCI_DRIVER);
1194#endif 1215#endif