diff options
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 19 | ||||
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 18 |
2 files changed, 26 insertions, 11 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 185721dba42b..251b5d369220 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -42,6 +42,9 @@ | |||
42 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
43 | #include <asm/system.h> | 43 | #include <asm/system.h> |
44 | #include <asm/unaligned.h> | 44 | #include <asm/unaligned.h> |
45 | #ifdef CONFIG_PPC_PS3 | ||
46 | #include <asm/firmware.h> | ||
47 | #endif | ||
45 | 48 | ||
46 | 49 | ||
47 | /*-------------------------------------------------------------------------*/ | 50 | /*-------------------------------------------------------------------------*/ |
@@ -951,15 +954,18 @@ static int __init ehci_hcd_init(void) | |||
951 | #endif | 954 | #endif |
952 | 955 | ||
953 | #ifdef PS3_SYSTEM_BUS_DRIVER | 956 | #ifdef PS3_SYSTEM_BUS_DRIVER |
954 | retval = ps3_system_bus_driver_register(&PS3_SYSTEM_BUS_DRIVER); | 957 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) { |
955 | if (retval < 0) { | 958 | retval = ps3_system_bus_driver_register( |
959 | &PS3_SYSTEM_BUS_DRIVER); | ||
960 | if (retval < 0) { | ||
956 | #ifdef PLATFORM_DRIVER | 961 | #ifdef PLATFORM_DRIVER |
957 | platform_driver_unregister(&PLATFORM_DRIVER); | 962 | platform_driver_unregister(&PLATFORM_DRIVER); |
958 | #endif | 963 | #endif |
959 | #ifdef PCI_DRIVER | 964 | #ifdef PCI_DRIVER |
960 | pci_unregister_driver(&PCI_DRIVER); | 965 | pci_unregister_driver(&PCI_DRIVER); |
961 | #endif | 966 | #endif |
962 | return retval; | 967 | return retval; |
968 | } | ||
963 | } | 969 | } |
964 | #endif | 970 | #endif |
965 | 971 | ||
@@ -976,7 +982,8 @@ static void __exit ehci_hcd_cleanup(void) | |||
976 | pci_unregister_driver(&PCI_DRIVER); | 982 | pci_unregister_driver(&PCI_DRIVER); |
977 | #endif | 983 | #endif |
978 | #ifdef PS3_SYSTEM_BUS_DRIVER | 984 | #ifdef PS3_SYSTEM_BUS_DRIVER |
979 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | 985 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) |
986 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | ||
980 | #endif | 987 | #endif |
981 | } | 988 | } |
982 | module_exit(ehci_hcd_cleanup); | 989 | module_exit(ehci_hcd_cleanup); |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index fa6a7ceaa0db..f0d29eda3c6d 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -42,6 +42,9 @@ | |||
42 | #include <asm/system.h> | 42 | #include <asm/system.h> |
43 | #include <asm/unaligned.h> | 43 | #include <asm/unaligned.h> |
44 | #include <asm/byteorder.h> | 44 | #include <asm/byteorder.h> |
45 | #ifdef CONFIG_PPC_PS3 | ||
46 | #include <asm/firmware.h> | ||
47 | #endif | ||
45 | 48 | ||
46 | #include "../core/hcd.h" | 49 | #include "../core/hcd.h" |
47 | 50 | ||
@@ -944,9 +947,12 @@ static int __init ohci_hcd_mod_init(void) | |||
944 | sizeof (struct ed), sizeof (struct td)); | 947 | sizeof (struct ed), sizeof (struct td)); |
945 | 948 | ||
946 | #ifdef PS3_SYSTEM_BUS_DRIVER | 949 | #ifdef PS3_SYSTEM_BUS_DRIVER |
947 | retval = ps3_system_bus_driver_register(&PS3_SYSTEM_BUS_DRIVER); | 950 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) { |
948 | if (retval < 0) | 951 | retval = ps3_system_bus_driver_register( |
949 | goto error_ps3; | 952 | &PS3_SYSTEM_BUS_DRIVER); |
953 | if (retval < 0) | ||
954 | goto error_ps3; | ||
955 | } | ||
950 | #endif | 956 | #endif |
951 | 957 | ||
952 | #ifdef PLATFORM_DRIVER | 958 | #ifdef PLATFORM_DRIVER |
@@ -992,7 +998,8 @@ static int __init ohci_hcd_mod_init(void) | |||
992 | error_platform: | 998 | error_platform: |
993 | #endif | 999 | #endif |
994 | #ifdef PS3_SYSTEM_BUS_DRIVER | 1000 | #ifdef PS3_SYSTEM_BUS_DRIVER |
995 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | 1001 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) |
1002 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | ||
996 | error_ps3: | 1003 | error_ps3: |
997 | #endif | 1004 | #endif |
998 | return retval; | 1005 | return retval; |
@@ -1014,7 +1021,8 @@ static void __exit ohci_hcd_mod_exit(void) | |||
1014 | platform_driver_unregister(&PLATFORM_DRIVER); | 1021 | platform_driver_unregister(&PLATFORM_DRIVER); |
1015 | #endif | 1022 | #endif |
1016 | #ifdef PS3_SYSTEM_BUS_DRIVER | 1023 | #ifdef PS3_SYSTEM_BUS_DRIVER |
1017 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | 1024 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) |
1025 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | ||
1018 | #endif | 1026 | #endif |
1019 | } | 1027 | } |
1020 | module_exit(ohci_hcd_mod_exit); | 1028 | module_exit(ohci_hcd_mod_exit); |