aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-s5p.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-s5p.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-s5p.c')
-rw-r--r--drivers/usb/host/ehci-s5p.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index c7e0936d4a7c..13c179fb2ee2 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -40,7 +40,7 @@ static const struct hc_driver s5p_ehci_hc_driver = {
40 .irq = ehci_irq, 40 .irq = ehci_irq,
41 .flags = HCD_MEMORY | HCD_USB2, 41 .flags = HCD_MEMORY | HCD_USB2,
42 42
43 .reset = ehci_init, 43 .reset = ehci_setup,
44 .start = ehci_run, 44 .start = ehci_run,
45 .stop = ehci_stop, 45 .stop = ehci_stop,
46 .shutdown = ehci_shutdown, 46 .shutdown = ehci_shutdown,
@@ -134,20 +134,10 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev)
134 134
135 ehci = hcd_to_ehci(hcd); 135 ehci = hcd_to_ehci(hcd);
136 ehci->caps = hcd->regs; 136 ehci->caps = hcd->regs;
137 ehci->regs = hcd->regs +
138 HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase));
139 137
140 /* DMA burst Enable */ 138 /* DMA burst Enable */
141 writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); 139 writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs));
142 140
143 dbg_hcs_params(ehci, "reset");
144 dbg_hcc_params(ehci, "reset");
145
146 /* cache this readonly data; minimize chip reads */
147 ehci->hcs_params = readl(&ehci->caps->hcs_params);
148
149 ehci_reset(ehci);
150
151 err = usb_add_hcd(hcd, irq, IRQF_SHARED); 141 err = usb_add_hcd(hcd, irq, IRQF_SHARED);
152 if (err) { 142 if (err) {
153 dev_err(&pdev->dev, "Failed to add USB HCD\n"); 143 dev_err(&pdev->dev, "Failed to add USB HCD\n");