]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ehci-ppc-soc.c
ipg: Kconfig whitepaces/tab damages
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ehci-ppc-soc.c
index c2cedb09ed8bf02699aff32c0010e8d81ab0d841..452d4b1bc85927e4d21c3bb91caea7e14dc16d8a 100644 (file)
@@ -6,7 +6,7 @@
  * Bus Glue for PPC On-Chip EHCI driver
  * Tested on AMCC 440EPx
  *
- * Based on "ehci-au12xx.c" by David Brownell <dbrownell@users.sourceforge.net>
+ * Based on "ehci-au1xxx.c" by K.Boge <karsten.boge@amd.com>
  *
  * This file is licenced under the GPL.
  */
 
 extern int usb_disabled(void);
 
+/* called during probe() after chip reset completes */
+static int ehci_ppc_soc_setup(struct usb_hcd *hcd)
+{
+       struct ehci_hcd *ehci = hcd_to_ehci(hcd);
+       int             retval;
+
+       retval = ehci_halt(ehci);
+       if (retval)
+               return retval;
+
+       retval = ehci_init(hcd);
+       if (retval)
+               return retval;
+
+       ehci->sbrn = 0x20;
+       return ehci_reset(ehci);
+}
+
 /**
  * usb_ehci_ppc_soc_probe - initialize PPC-SoC-based HCDs
  * Context: !in_interrupt()
@@ -120,7 +138,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = {
        /*
         * basic lifecycle operations
         */
-       .reset = ehci_init,
+       .reset = ehci_ppc_soc_setup,
        .start = ehci_run,
        .stop = ehci_stop,
        .shutdown = ehci_shutdown,
@@ -142,10 +160,8 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = {
         */
        .hub_status_data = ehci_hub_status_data,
        .hub_control = ehci_hub_control,
-#ifdef CONFIG_PM
-       .hub_suspend = ehci_hub_suspend,
-       .hub_resume = ehci_hub_resume,
-#endif
+       .bus_suspend = ehci_bus_suspend,
+       .bus_resume = ehci_bus_resume,
 };
 
 static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev)