diff options
author | Mike Nuss <mike@terascala.com> | 2007-08-20 21:21:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-08-22 17:28:01 -0400 |
commit | c907d3b09f7a50023b61ba6ec4e01ccaa543a7ae (patch) | |
tree | ef0eaa13142324ae4298789bffce92749800b5ef /drivers/usb | |
parent | 4c132e77242c130aea81c8fc64d59f573a26bf8d (diff) |
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 <mike@terascala.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: K.Boge <karsten.boge@amd.com>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-au1xxx.c | 5 | ||||
-rw-r--r-- | 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 5d1b12aad776..b1d19268cb23 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c | |||
@@ -1,8 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * EHCI HCD (Host Controller Driver) for USB. | 2 | * EHCI HCD (Host Controller Driver) for USB. |
3 | * | 3 | * |
4 | * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net> | ||
5 | * | ||
6 | * Bus Glue for AMD Alchemy Au1xxx | 4 | * Bus Glue for AMD Alchemy Au1xxx |
7 | * | 5 | * |
8 | * Based on "ohci-au1xxx.c" by Matt Porter <mporter@kernel.crashing.org> | 6 | * 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 | 194 | ||
197 | /* | 195 | /* |
198 | * basic lifecycle operations | 196 | * basic lifecycle operations |
197 | * | ||
198 | * FIXME -- ehci_init() doesn't do enough here. | ||
199 | * See ehci-ppc-soc for a complete implementation. | ||
199 | */ | 200 | */ |
200 | .reset = ehci_init, | 201 | .reset = ehci_init, |
201 | .start = ehci_run, | 202 | .start = ehci_run, |
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c index c2cedb09ed8b..4f99b0eb27bc 100644 --- a/drivers/usb/host/ehci-ppc-soc.c +++ b/drivers/usb/host/ehci-ppc-soc.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Bus Glue for PPC On-Chip EHCI driver | 6 | * Bus Glue for PPC On-Chip EHCI driver |
7 | * Tested on AMCC 440EPx | 7 | * Tested on AMCC 440EPx |
8 | * | 8 | * |
9 | * Based on "ehci-au12xx.c" by David Brownell <dbrownell@users.sourceforge.net> | 9 | * Based on "ehci-au1xxx.c" by K.Boge <karsten.boge@amd.com> |
10 | * | 10 | * |
11 | * This file is licenced under the GPL. | 11 | * This file is licenced under the GPL. |
12 | */ | 12 | */ |
@@ -15,6 +15,24 @@ | |||
15 | 15 | ||
16 | extern int usb_disabled(void); | 16 | extern int usb_disabled(void); |
17 | 17 | ||
18 | /* called during probe() after chip reset completes */ | ||
19 | static int ehci_ppc_soc_setup(struct usb_hcd *hcd) | ||
20 | { | ||
21 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | ||
22 | int retval; | ||
23 | |||
24 | retval = ehci_halt(ehci); | ||
25 | if (retval) | ||
26 | return retval; | ||
27 | |||
28 | retval = ehci_init(hcd); | ||
29 | if (retval) | ||
30 | return retval; | ||
31 | |||
32 | ehci->sbrn = 0x20; | ||
33 | return ehci_reset(ehci); | ||
34 | } | ||
35 | |||
18 | /** | 36 | /** |
19 | * usb_ehci_ppc_soc_probe - initialize PPC-SoC-based HCDs | 37 | * usb_ehci_ppc_soc_probe - initialize PPC-SoC-based HCDs |
20 | * Context: !in_interrupt() | 38 | * Context: !in_interrupt() |
@@ -120,7 +138,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = { | |||
120 | /* | 138 | /* |
121 | * basic lifecycle operations | 139 | * basic lifecycle operations |
122 | */ | 140 | */ |
123 | .reset = ehci_init, | 141 | .reset = ehci_ppc_soc_setup, |
124 | .start = ehci_run, | 142 | .start = ehci_run, |
125 | .stop = ehci_stop, | 143 | .stop = ehci_stop, |
126 | .shutdown = ehci_shutdown, | 144 | .shutdown = ehci_shutdown, |