Commit c907d3b0 authored by Mike Nuss's avatar Mike Nuss Committed by Greg Kroah-Hartman

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: default avatarMike Nuss <mike@terascala.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Cc: K.Boge <karsten.boge@amd.com>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: default avatarStefan Roese <sr@denx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4c132e77
/* /*
* EHCI HCD (Host Controller Driver) for USB. * EHCI HCD (Host Controller Driver) for USB.
* *
* (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net>
*
* Bus Glue for AMD Alchemy Au1xxx * Bus Glue for AMD Alchemy Au1xxx
* *
* Based on "ohci-au1xxx.c" by Matt Porter <mporter@kernel.crashing.org> * Based on "ohci-au1xxx.c" by Matt Porter <mporter@kernel.crashing.org>
...@@ -196,6 +194,9 @@ static const struct hc_driver ehci_au1xxx_hc_driver = { ...@@ -196,6 +194,9 @@ static const struct hc_driver ehci_au1xxx_hc_driver = {
/* /*
* basic lifecycle operations * basic lifecycle operations
*
* FIXME -- ehci_init() doesn't do enough here.
* See ehci-ppc-soc for a complete implementation.
*/ */
.reset = ehci_init, .reset = ehci_init,
.start = ehci_run, .start = ehci_run,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Bus Glue for PPC On-Chip EHCI driver * Bus Glue for PPC On-Chip EHCI driver
* Tested on AMCC 440EPx * 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. * This file is licenced under the GPL.
*/ */
...@@ -15,6 +15,24 @@ ...@@ -15,6 +15,24 @@
extern int usb_disabled(void); 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 * usb_ehci_ppc_soc_probe - initialize PPC-SoC-based HCDs
* Context: !in_interrupt() * Context: !in_interrupt()
...@@ -120,7 +138,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = { ...@@ -120,7 +138,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = {
/* /*
* basic lifecycle operations * basic lifecycle operations
*/ */
.reset = ehci_init, .reset = ehci_ppc_soc_setup,
.start = ehci_run, .start = ehci_run,
.stop = ehci_stop, .stop = ehci_stop,
.shutdown = ehci_shutdown, .shutdown = ehci_shutdown,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment