aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hcd.c
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2006-12-13 15:09:55 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:44:33 -0500
commit495a678fc62e850d15f860d39faee07ba0a8910c (patch)
tree4f8f12bafc2039fadda6e88efdc1b57729ca31d8 /drivers/usb/host/ohci-hcd.c
parent5e16fabe5dbcff15de6cdcba406195fe6e4380df (diff)
ohci: Add support for OHCI controller on the of_platform bus
PPC embedded systems can have a ohci controller builtin. In the new model, it will end up as a driver on the of_platform bus, this patches takes care of them. Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Acked-by: 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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 3f80003b40bd..8baecbdf0621 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -914,8 +914,14 @@ MODULE_LICENSE ("GPL");
914#endif 914#endif
915 915
916 916
917#ifdef CONFIG_USB_OHCI_HCD_PPC_OF
918#include "ohci-ppc-of.c"
919#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver
920#endif
921
917#if !defined(PCI_DRIVER) && \ 922#if !defined(PCI_DRIVER) && \
918 !defined(PLATFORM_DRIVER) && \ 923 !defined(PLATFORM_DRIVER) && \
924 !defined(OF_PLATFORM_DRIVER) && \
919 !defined(SA1111_DRIVER) 925 !defined(SA1111_DRIVER)
920#error "missing bus glue for ohci-hcd" 926#error "missing bus glue for ohci-hcd"
921#endif 927#endif
@@ -939,6 +945,13 @@ static int __init ohci_hcd_mod_init(void)
939 ls++; 945 ls++;
940#endif 946#endif
941 947
948#ifdef OF_PLATFORM_DRIVER
949 retval = of_register_platform_driver(&OF_PLATFORM_DRIVER);
950 if (retval < 0)
951 goto error;
952 ls++;
953#endif
954
942#ifdef SA1111_DRIVER 955#ifdef SA1111_DRIVER
943 retval = sa1111_driver_register(&SA1111_DRIVER); 956 retval = sa1111_driver_register(&SA1111_DRIVER);
944 if (retval < 0) 957 if (retval < 0)
@@ -961,6 +974,10 @@ error:
961 if (ls--) 974 if (ls--)
962 platform_driver_unregister(&PLATFORM_DRIVER); 975 platform_driver_unregister(&PLATFORM_DRIVER);
963#endif 976#endif
977#ifdef OF_PLATFORM_DRIVER
978 if (ls--)
979 of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
980#endif
964#ifdef SA1111_DRIVER 981#ifdef SA1111_DRIVER
965 if (ls--) 982 if (ls--)
966 sa1111_driver_unregister(&SA1111_DRIVER); 983 sa1111_driver_unregister(&SA1111_DRIVER);
@@ -977,6 +994,9 @@ static void __exit ohci_hcd_mod_exit(void)
977#ifdef SA1111_DRIVER 994#ifdef SA1111_DRIVER
978 sa1111_driver_unregister(&SA1111_DRIVER); 995 sa1111_driver_unregister(&SA1111_DRIVER);
979#endif 996#endif
997#ifdef OF_PLATFORM_DRIVER
998 of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
999#endif
980#ifdef PLATFORM_DRIVER 1000#ifdef PLATFORM_DRIVER
981 platform_driver_unregister(&PLATFORM_DRIVER); 1001 platform_driver_unregister(&PLATFORM_DRIVER);
982#endif 1002#endif