diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-01-15 23:11:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:44:35 -0500 |
commit | ad75a41085d80c8ce5e885962c15779935f8267e (patch) | |
tree | 4479f654037ffd3660f43f546bb480a7a7c09a47 /drivers/usb/host/ehci-hcd.c | |
parent | b3ebd5222141efa489d95592b7d4536766530e56 (diff) |
USB: ps3 ehci bus glue
USB EHCI 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/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 03d567e4d00a..9ec896218feb 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -907,7 +907,13 @@ MODULE_LICENSE ("GPL"); | |||
907 | #define PLATFORM_DRIVER ehci_hcd_au1xxx_driver | 907 | #define PLATFORM_DRIVER ehci_hcd_au1xxx_driver |
908 | #endif | 908 | #endif |
909 | 909 | ||
910 | #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) | 910 | #ifdef CONFIG_PPC_PS3 |
911 | #include "ehci-ps3.c" | ||
912 | #define PS3_SYSTEM_BUS_DRIVER ps3_ehci_sb_driver | ||
913 | #endif | ||
914 | |||
915 | #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ | ||
916 | !defined(PS3_SYSTEM_BUS_DRIVER) | ||
911 | #error "missing bus glue for ehci-hcd" | 917 | #error "missing bus glue for ehci-hcd" |
912 | #endif | 918 | #endif |
913 | 919 | ||
@@ -932,6 +938,20 @@ static int __init ehci_hcd_init(void) | |||
932 | #ifdef PLATFORM_DRIVER | 938 | #ifdef PLATFORM_DRIVER |
933 | platform_driver_unregister(&PLATFORM_DRIVER); | 939 | platform_driver_unregister(&PLATFORM_DRIVER); |
934 | #endif | 940 | #endif |
941 | return retval; | ||
942 | } | ||
943 | #endif | ||
944 | |||
945 | #ifdef PS3_SYSTEM_BUS_DRIVER | ||
946 | retval = ps3_system_bus_driver_register(&PS3_SYSTEM_BUS_DRIVER); | ||
947 | if (retval < 0) { | ||
948 | #ifdef PLATFORM_DRIVER | ||
949 | platform_driver_unregister(&PLATFORM_DRIVER); | ||
950 | #endif | ||
951 | #ifdef PCI_DRIVER | ||
952 | pci_unregister_driver(&PCI_DRIVER); | ||
953 | #endif | ||
954 | return retval; | ||
935 | } | 955 | } |
936 | #endif | 956 | #endif |
937 | 957 | ||
@@ -947,6 +967,9 @@ static void __exit ehci_hcd_cleanup(void) | |||
947 | #ifdef PCI_DRIVER | 967 | #ifdef PCI_DRIVER |
948 | pci_unregister_driver(&PCI_DRIVER); | 968 | pci_unregister_driver(&PCI_DRIVER); |
949 | #endif | 969 | #endif |
970 | #ifdef PS3_SYSTEM_BUS_DRIVER | ||
971 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | ||
972 | #endif | ||
950 | } | 973 | } |
951 | module_exit(ehci_hcd_cleanup); | 974 | module_exit(ehci_hcd_cleanup); |
952 | 975 | ||