aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-mxc.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-07-09 15:55:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-09 16:35:05 -0400
commit1a49e2ac9651df7349867a5cf44e2c83de1046af (patch)
treeb4ba01d645073947dcf8bbe1972b7af740031b5b /drivers/usb/host/ehci-mxc.c
parent1530280084c3905be6fce802cbfa83fb3bbb8839 (diff)
EHCI: centralize controller initialization
This patch (as1564c) converts the EHCI platform drivers to use the central ehci_setup() routine for generic controller initialization rather than each having its own idiosyncratic approach. The major point of difficulty lies in ehci-pci's many vendor- and device-specific workarounds. Some of them have to be applied before calling ehci_setup() and some after, which necessitates a fair amount of code motion. The other platform drivers require much smaller changes. One point not addressed by the patch is whether ports should be powered on or off following initialization. The different drivers appear to handle this pretty much at random. In fact it shouldn't matter, because the hub driver turns on power to all ports when it binds to the root hub. Straightening that out will be left for another day. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-mxc.c')
-rw-r--r--drivers/usb/host/ehci-mxc.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index c778ffe4e4e5..34201372c85f 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -42,27 +42,12 @@ static int ehci_mxc_setup(struct usb_hcd *hcd)
42 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 42 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
43 int retval; 43 int retval;
44 44
45 dbg_hcs_params(ehci, "reset");
46 dbg_hcc_params(ehci, "reset");
47
48 /* cache this readonly data; minimize chip reads */
49 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
50
51 hcd->has_tt = 1; 45 hcd->has_tt = 1;
52 46
53 retval = ehci_halt(ehci); 47 retval = ehci_setup(hcd);
54 if (retval) 48 if (retval)
55 return retval; 49 return retval;
56 50
57 /* data structure init */
58 retval = ehci_init(hcd);
59 if (retval)
60 return retval;
61
62 ehci->sbrn = 0x20;
63
64 ehci_reset(ehci);
65
66 ehci_port_power(ehci, 0); 51 ehci_port_power(ehci, 0);
67 return 0; 52 return 0;
68} 53}