diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-01-15 23:12:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:44:37 -0500 |
commit | 6a6c957eba20814456bc4bffbd4ec42406f9eb02 (patch) | |
tree | 21e215b745658c6ff49b833da59c84327c9793d2 /drivers/usb/host/ohci-hcd.c | |
parent | de44743b033942731f6b898c2d389f7ee5ac890b (diff) |
USB: ps3 ohci bus glue
USB OHCI driver bus glue for the PS3 game console.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.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.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 2c4a6299e4c6..fa6a7ceaa0db 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -919,10 +919,16 @@ MODULE_LICENSE ("GPL"); | |||
919 | #define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver | 919 | #define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver |
920 | #endif | 920 | #endif |
921 | 921 | ||
922 | #ifdef CONFIG_PPC_PS3 | ||
923 | #include "ohci-ps3.c" | ||
924 | #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_sb_driver | ||
925 | #endif | ||
926 | |||
922 | #if !defined(PCI_DRIVER) && \ | 927 | #if !defined(PCI_DRIVER) && \ |
923 | !defined(PLATFORM_DRIVER) && \ | 928 | !defined(PLATFORM_DRIVER) && \ |
924 | !defined(OF_PLATFORM_DRIVER) && \ | 929 | !defined(OF_PLATFORM_DRIVER) && \ |
925 | !defined(SA1111_DRIVER) | 930 | !defined(SA1111_DRIVER) && \ |
931 | !defined(PS3_SYSTEM_BUS_DRIVER) | ||
926 | #error "missing bus glue for ohci-hcd" | 932 | #error "missing bus glue for ohci-hcd" |
927 | #endif | 933 | #endif |
928 | 934 | ||
@@ -937,6 +943,12 @@ static int __init ohci_hcd_mod_init(void) | |||
937 | pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name, | 943 | pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name, |
938 | sizeof (struct ed), sizeof (struct td)); | 944 | sizeof (struct ed), sizeof (struct td)); |
939 | 945 | ||
946 | #ifdef PS3_SYSTEM_BUS_DRIVER | ||
947 | retval = ps3_system_bus_driver_register(&PS3_SYSTEM_BUS_DRIVER); | ||
948 | if (retval < 0) | ||
949 | goto error_ps3; | ||
950 | #endif | ||
951 | |||
940 | #ifdef PLATFORM_DRIVER | 952 | #ifdef PLATFORM_DRIVER |
941 | retval = platform_driver_register(&PLATFORM_DRIVER); | 953 | retval = platform_driver_register(&PLATFORM_DRIVER); |
942 | if (retval < 0) | 954 | if (retval < 0) |
@@ -979,6 +991,10 @@ static int __init ohci_hcd_mod_init(void) | |||
979 | platform_driver_unregister(&PLATFORM_DRIVER); | 991 | platform_driver_unregister(&PLATFORM_DRIVER); |
980 | error_platform: | 992 | error_platform: |
981 | #endif | 993 | #endif |
994 | #ifdef PS3_SYSTEM_BUS_DRIVER | ||
995 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | ||
996 | error_ps3: | ||
997 | #endif | ||
982 | return retval; | 998 | return retval; |
983 | } | 999 | } |
984 | module_init(ohci_hcd_mod_init); | 1000 | module_init(ohci_hcd_mod_init); |
@@ -997,6 +1013,9 @@ static void __exit ohci_hcd_mod_exit(void) | |||
997 | #ifdef PLATFORM_DRIVER | 1013 | #ifdef PLATFORM_DRIVER |
998 | platform_driver_unregister(&PLATFORM_DRIVER); | 1014 | platform_driver_unregister(&PLATFORM_DRIVER); |
999 | #endif | 1015 | #endif |
1016 | #ifdef PS3_SYSTEM_BUS_DRIVER | ||
1017 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | ||
1018 | #endif | ||
1000 | } | 1019 | } |
1001 | module_exit(ohci_hcd_mod_exit); | 1020 | module_exit(ohci_hcd_mod_exit); |
1002 | 1021 | ||