Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c907d3b09f7a50023b61ba6ec4e01ccaa543a7ae
Commit:     c907d3b09f7a50023b61ba6ec4e01ccaa543a7ae
Parent:     4c132e77242c130aea81c8fc64d59f573a26bf8d
Author:     Mike Nuss <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 20 18:21:15 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Wed Aug 22 14:28:01 2007 -0700

    USB: make EHCI initialize properly on PPC SOCs
    
    Correctly initialize the on-chip EHCI controller on the AMCC PPC440EPx.
    Fix "USB 0.0" initialization message, and properly put the controller
    into a known state before starting it.
    
    Add "FIXME" comment to the au1xxx bus glue which is doing the same wrong
    thing here.  (Who maintains that, now that AMD sold off Alchemy?)  Remove
    some false copyright attributions which were somehow placed in the au1xxx
    bus glue then copied into ppc-soc.
    
    Signed-off-by: Mike Nuss <[EMAIL PROTECTED]>
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Cc: K.Boge <[EMAIL PROTECTED]>
    Cc: Jordan Crouse <[EMAIL PROTECTED]>
    Signed-off-by: Stefan Roese <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/host/ehci-au1xxx.c  |    5 +++--
 drivers/usb/host/ehci-ppc-soc.c |   22 ++++++++++++++++++++--
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
index 5d1b12a..b1d1926 100644
--- a/drivers/usb/host/ehci-au1xxx.c
+++ b/drivers/usb/host/ehci-au1xxx.c
@@ -1,8 +1,6 @@
 /*
  * EHCI HCD (Host Controller Driver) for USB.
  *
- * (C) Copyright 2000-2004 David Brownell <[EMAIL PROTECTED]>
- *
  * Bus Glue for AMD Alchemy Au1xxx
  *
  * Based on "ohci-au1xxx.c" by Matt Porter <[EMAIL PROTECTED]>
@@ -196,6 +194,9 @@ static const struct hc_driver ehci_au1xxx_hc_driver = {
 
        /*
         * basic lifecycle operations
+        *
+        * FIXME -- ehci_init() doesn't do enough here.
+        * See ehci-ppc-soc for a complete implementation.
         */
        .reset = ehci_init,
        .start = ehci_run,
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c
index c2cedb0..4f99b0e 100644
--- a/drivers/usb/host/ehci-ppc-soc.c
+++ b/drivers/usb/host/ehci-ppc-soc.c
@@ -6,7 +6,7 @@
  * Bus Glue for PPC On-Chip EHCI driver
  * Tested on AMCC 440EPx
  *
- * Based on "ehci-au12xx.c" by David Brownell <[EMAIL PROTECTED]>
+ * Based on "ehci-au1xxx.c" by K.Boge <[EMAIL PROTECTED]>
  *
  * This file is licenced under the GPL.
  */
@@ -15,6 +15,24 @@
 
 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,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to