aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-vt8500.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-vt8500.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-vt8500.c')
-rw-r--r--drivers/usb/host/ehci-vt8500.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/usb/host/ehci-vt8500.c b/drivers/usb/host/ehci-vt8500.c
index c1eda73916cd..4d147c4e33f5 100644
--- a/drivers/usb/host/ehci-vt8500.c
+++ b/drivers/usb/host/ehci-vt8500.c
@@ -48,7 +48,7 @@ static const struct hc_driver vt8500_ehci_hc_driver = {
48 /* 48 /*
49 * basic lifecycle operations 49 * basic lifecycle operations
50 */ 50 */
51 .reset = ehci_init, 51 .reset = ehci_setup,
52 .start = ehci_run, 52 .start = ehci_run,
53 .stop = ehci_stop, 53 .stop = ehci_stop,
54 .shutdown = ehci_shutdown, 54 .shutdown = ehci_shutdown,
@@ -121,18 +121,6 @@ static int vt8500_ehci_drv_probe(struct platform_device *pdev)
121 121
122 ehci = hcd_to_ehci(hcd); 122 ehci = hcd_to_ehci(hcd);
123 ehci->caps = hcd->regs; 123 ehci->caps = hcd->regs;
124 ehci->regs = hcd->regs +
125 HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase));
126
127 dbg_hcs_params(ehci, "reset");
128 dbg_hcc_params(ehci, "reset");
129
130 /* cache this readonly data; minimize chip reads */
131 ehci->hcs_params = readl(&ehci->caps->hcs_params);
132
133 ehci_port_power(ehci, 1);
134
135 ehci_reset(ehci);
136 124
137 ret = usb_add_hcd(hcd, pdev->resource[1].start, 125 ret = usb_add_hcd(hcd, pdev->resource[1].start,
138 IRQF_SHARED); 126 IRQF_SHARED);