aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/ehci-omap.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 1ba1df89a436..755b428019a1 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -90,26 +90,13 @@ static inline u32 ehci_read(void __iomem *base, u32 reg)
90static int omap_ehci_init(struct usb_hcd *hcd) 90static int omap_ehci_init(struct usb_hcd *hcd)
91{ 91{
92 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 92 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
93 struct omap_hcd *omap = (struct omap_hcd *)ehci->priv; 93 int rc;
94 int rc, i;
95
96 /* Hold PHYs in reset while initializing EHCI controller */
97 for (i = 0; i < omap->nports; i++) {
98 if (omap->phy[i])
99 usb_phy_shutdown(omap->phy[i]);
100 }
101 94
102 /* we know this is the memory we want, no need to ioremap again */ 95 /* we know this is the memory we want, no need to ioremap again */
103 ehci->caps = hcd->regs; 96 ehci->caps = hcd->regs;
104 97
105 rc = ehci_setup(hcd); 98 rc = ehci_setup(hcd);
106 99
107 /* Bring PHYs out of reset */
108 for (i = 0; i < omap->nports; i++) {
109 if (omap->phy[i])
110 usb_phy_init(omap->phy[i]);
111 }
112
113 return rc; 100 return rc;
114} 101}
115 102
@@ -219,9 +206,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
219 } 206 }
220 207
221 omap->phy[i] = phy; 208 omap->phy[i] = phy;
222 usb_phy_init(omap->phy[i]);
223 /* bring PHY out of suspend */
224 usb_phy_set_suspend(omap->phy[i], 0);
225 } 209 }
226 210
227 pm_runtime_enable(dev); 211 pm_runtime_enable(dev);
@@ -245,6 +229,20 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
245 goto err_pm_runtime; 229 goto err_pm_runtime;
246 } 230 }
247 231
232 /*
233 * Bring PHYs out of reset.
234 * Even though HSIC mode is a PHY-less mode, the reset
235 * line exists between the chips and can be modelled
236 * as a PHY device for reset control.
237 */
238 for (i = 0; i < omap->nports; i++) {
239 if (!omap->phy[i])
240 continue;
241
242 usb_phy_init(omap->phy[i]);
243 /* bring PHY out of suspend */
244 usb_phy_set_suspend(omap->phy[i], 0);
245 }
248 246
249 return 0; 247 return 0;
250 248