aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2011-11-22 21:04:45 -0500
committerGeoff Levand <geoff@infradead.org>2011-12-08 12:38:53 -0500
commit876e0df902c726408c84b75dab673a90fd492e1d (patch)
tree9af8a84b8bedb6e727067e57355be5996d4bcabd
parent5611cc4572e889b62a7b4c72a413536bf6a9c416 (diff)
usb: Remove ehci_reset call from ehci_run
Remove the ehci_reset() call done in the ehci_run() routine of the USB EHCI host controller driver and add an ehci_reset() call to the probe processing of all EHCI platform drivers that do not already call ehci_reset(). The call to ehci_reset() from ehci_run() was problematic for several platform drivers, and unnecessary for others. This change moves the decision to call ehci_reset() at driver startup to the platform driver code. Signed-off-by: Geoff Levand <geoff@infradead.org> Acked-by: Alan Stern <stern@rowland.harvard.edu>
-rw-r--r--drivers/usb/host/ehci-au1xxx.c1
-rw-r--r--drivers/usb/host/ehci-hcd.c11
-rw-r--r--drivers/usb/host/ehci-octeon.c2
-rw-r--r--drivers/usb/host/ehci-omap.c2
-rw-r--r--drivers/usb/host/ehci-s5p.c2
-rw-r--r--drivers/usb/host/ehci-vt8500.c2
-rw-r--r--drivers/usb/host/ehci-w90x900.c2
7 files changed, 12 insertions, 10 deletions
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
index 18bafa99fe57..bf7441afed16 100644
--- a/drivers/usb/host/ehci-au1xxx.c
+++ b/drivers/usb/host/ehci-au1xxx.c
@@ -23,6 +23,7 @@ static int au1xxx_ehci_setup(struct usb_hcd *hcd)
23 int ret = ehci_init(hcd); 23 int ret = ehci_init(hcd);
24 24
25 ehci->need_io_watchdog = 0; 25 ehci->need_io_watchdog = 0;
26 ehci_reset(ehci);
26 return ret; 27 return ret;
27} 28}
28 29
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 3ff9f82f7263..46dccbf85c1a 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -677,22 +677,13 @@ static int ehci_init(struct usb_hcd *hcd)
677static int ehci_run (struct usb_hcd *hcd) 677static int ehci_run (struct usb_hcd *hcd)
678{ 678{
679 struct ehci_hcd *ehci = hcd_to_ehci (hcd); 679 struct ehci_hcd *ehci = hcd_to_ehci (hcd);
680 int retval;
681 u32 temp; 680 u32 temp;
682 u32 hcc_params; 681 u32 hcc_params;
683 682
684 hcd->uses_new_polling = 1; 683 hcd->uses_new_polling = 1;
685 684
686 /* EHCI spec section 4.1 */ 685 /* EHCI spec section 4.1 */
687 /* 686
688 * TDI driver does the ehci_reset in their reset callback.
689 * Don't reset here, because configuration settings will
690 * vanish.
691 */
692 if (!ehci_is_TDI(ehci) && (retval = ehci_reset(ehci)) != 0) {
693 ehci_mem_cleanup(ehci);
694 return retval;
695 }
696 ehci_writel(ehci, ehci->periodic_dma, &ehci->regs->frame_list); 687 ehci_writel(ehci, ehci->periodic_dma, &ehci->regs->frame_list);
697 ehci_writel(ehci, (u32)ehci->async->qh_dma, &ehci->regs->async_next); 688 ehci_writel(ehci, (u32)ehci->async->qh_dma, &ehci->regs->async_next);
698 689
diff --git a/drivers/usb/host/ehci-octeon.c b/drivers/usb/host/ehci-octeon.c
index ba1f51361134..c0104882c72d 100644
--- a/drivers/usb/host/ehci-octeon.c
+++ b/drivers/usb/host/ehci-octeon.c
@@ -155,6 +155,8 @@ static int ehci_octeon_drv_probe(struct platform_device *pdev)
155 /* cache this readonly data; minimize chip reads */ 155 /* cache this readonly data; minimize chip reads */
156 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); 156 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
157 157
158 ehci_reset(ehci);
159
158 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); 160 ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
159 if (ret) { 161 if (ret) {
160 dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret); 162 dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret);
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index e39b0297bad1..e33baf9052cb 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -228,6 +228,8 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
228 /* cache this readonly data; minimize chip reads */ 228 /* cache this readonly data; minimize chip reads */
229 omap_ehci->hcs_params = readl(&omap_ehci->caps->hcs_params); 229 omap_ehci->hcs_params = readl(&omap_ehci->caps->hcs_params);
230 230
231 ehci_reset(omap_ehci);
232
231 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); 233 ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
232 if (ret) { 234 if (ret) {
233 dev_err(dev, "failed to add hcd with err %d\n", ret); 235 dev_err(dev, "failed to add hcd with err %d\n", ret);
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index 024b65c4990d..397f827387b7 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -136,6 +136,8 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev)
136 /* cache this readonly data; minimize chip reads */ 136 /* cache this readonly data; minimize chip reads */
137 ehci->hcs_params = readl(&ehci->caps->hcs_params); 137 ehci->hcs_params = readl(&ehci->caps->hcs_params);
138 138
139 ehci_reset(ehci);
140
139 err = usb_add_hcd(hcd, irq, IRQF_SHARED); 141 err = usb_add_hcd(hcd, irq, IRQF_SHARED);
140 if (err) { 142 if (err) {
141 dev_err(&pdev->dev, "Failed to add USB HCD\n"); 143 dev_err(&pdev->dev, "Failed to add USB HCD\n");
diff --git a/drivers/usb/host/ehci-vt8500.c b/drivers/usb/host/ehci-vt8500.c
index 54d1ab8aec49..c1eda73916cd 100644
--- a/drivers/usb/host/ehci-vt8500.c
+++ b/drivers/usb/host/ehci-vt8500.c
@@ -132,6 +132,8 @@ static int vt8500_ehci_drv_probe(struct platform_device *pdev)
132 132
133 ehci_port_power(ehci, 1); 133 ehci_port_power(ehci, 1);
134 134
135 ehci_reset(ehci);
136
135 ret = usb_add_hcd(hcd, pdev->resource[1].start, 137 ret = usb_add_hcd(hcd, pdev->resource[1].start,
136 IRQF_SHARED); 138 IRQF_SHARED);
137 if (ret == 0) { 139 if (ret == 0) {
diff --git a/drivers/usb/host/ehci-w90x900.c b/drivers/usb/host/ehci-w90x900.c
index d661cf7de140..3d2e26cbb34c 100644
--- a/drivers/usb/host/ehci-w90x900.c
+++ b/drivers/usb/host/ehci-w90x900.c
@@ -78,6 +78,8 @@ static int __devinit usb_w90x900_probe(const struct hc_driver *driver,
78 if (irq < 0) 78 if (irq < 0)
79 goto err4; 79 goto err4;
80 80
81 ehci_reset(ehci);
82
81 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); 83 retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
82 if (retval != 0) 84 if (retval != 0)
83 goto err4; 85 goto err4;