dev_dbg: check dev_dbg() arguments
[profile/ivi/kernel-adaptation-intel-automotive.git] / drivers / usb / host / ohci-hcd.c
index 2c4a629..e8bbe8b 100644 (file)
@@ -42,6 +42,9 @@
 #include <asm/system.h>
 #include <asm/unaligned.h>
 #include <asm/byteorder.h>
+#ifdef CONFIG_PPC_PS3
+#include <asm/firmware.h>
+#endif
 
 #include "../core/hcd.h"
 
@@ -483,9 +486,6 @@ static int ohci_run (struct ohci_hcd *ohci)
         * or if bus glue did the same (e.g. for PCI add-in cards with
         * PCI PM support).
         */
-       ohci_dbg (ohci, "resetting from state '%s', control = 0x%x\n",
-                       hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),
-                       ohci_readl (ohci, &ohci->regs->control));
        if ((ohci->hc_control & OHCI_CTRL_RWC) != 0
                        && !device_may_wakeup(hcd->self.controller))
                device_init_wakeup(hcd->self.controller, 1);
@@ -741,9 +741,6 @@ static void ohci_stop (struct usb_hcd *hcd)
 {
        struct ohci_hcd         *ohci = hcd_to_ohci (hcd);
 
-       ohci_dbg (ohci, "stop %s controller (state 0x%02x)\n",
-               hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),
-               hcd->state);
        ohci_dump (ohci, 1);
 
        flush_scheduled_work();
@@ -919,10 +916,16 @@ MODULE_LICENSE ("GPL");
 #define OF_PLATFORM_DRIVER     ohci_hcd_ppc_of_driver
 #endif
 
+#ifdef CONFIG_PPC_PS3
+#include "ohci-ps3.c"
+#define PS3_SYSTEM_BUS_DRIVER  ps3_ohci_sb_driver
+#endif
+
 #if    !defined(PCI_DRIVER) &&         \
        !defined(PLATFORM_DRIVER) &&    \
        !defined(OF_PLATFORM_DRIVER) && \
-       !defined(SA1111_DRIVER)
+       !defined(SA1111_DRIVER) &&      \
+       !defined(PS3_SYSTEM_BUS_DRIVER)
 #error "missing bus glue for ohci-hcd"
 #endif
 
@@ -937,6 +940,15 @@ static int __init ohci_hcd_mod_init(void)
        pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
                sizeof (struct ed), sizeof (struct td));
 
+#ifdef PS3_SYSTEM_BUS_DRIVER
+       if (firmware_has_feature(FW_FEATURE_PS3_LV1)) {
+               retval = ps3_system_bus_driver_register(
+                               &PS3_SYSTEM_BUS_DRIVER);
+               if (retval < 0)
+                       goto error_ps3;
+       }
+#endif
+
 #ifdef PLATFORM_DRIVER
        retval = platform_driver_register(&PLATFORM_DRIVER);
        if (retval < 0)
@@ -979,6 +991,11 @@ static int __init ohci_hcd_mod_init(void)
        platform_driver_unregister(&PLATFORM_DRIVER);
  error_platform:
 #endif
+#ifdef PS3_SYSTEM_BUS_DRIVER
+       if (firmware_has_feature(FW_FEATURE_PS3_LV1))
+               ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
+ error_ps3:
+#endif
        return retval;
 }
 module_init(ohci_hcd_mod_init);
@@ -997,6 +1014,10 @@ static void __exit ohci_hcd_mod_exit(void)
 #ifdef PLATFORM_DRIVER
        platform_driver_unregister(&PLATFORM_DRIVER);
 #endif
+#ifdef PS3_SYSTEM_BUS_DRIVER
+       if (firmware_has_feature(FW_FEATURE_PS3_LV1))
+               ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
+#endif
 }
 module_exit(ohci_hcd_mod_exit);