aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2013-06-14 09:52:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 16:56:25 -0400
commit4e5c9e6fa2d232a0686d5fe45cd1508484048936 (patch)
tree35afb0682959bc64e883ff9b14923da9f2c6b92a /drivers/usb
parent8fefcfdd276be1459aaa2b2648037d2c0e1a3caa (diff)
USB: ehci-omap: Tweak PHY initialization sequence
For PHY mode, the PHYs must be brought out of reset before the EHCI controller is started. This patch fixes the issue where USB devices are not found on Beagleboard/Beagle-xm if USB has been started previously by the bootloader. (e.g. by "usb start" command in u-boot) Tested on Beagleboard, Beagleboard-xm and Pandaboard. Issue present on 3.10 onwards. Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Roger Quadros <rogerq@ti.com> Cc: stable <stable@vger.kernel.org> # 3.10 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-omap.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index bafa960ffd92..9bd7dfe3315b 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -187,6 +187,12 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
187 } 187 }
188 188
189 omap->phy[i] = phy; 189 omap->phy[i] = phy;
190
191 if (pdata->port_mode[i] == OMAP_EHCI_PORT_MODE_PHY) {
192 usb_phy_init(omap->phy[i]);
193 /* bring PHY out of suspend */
194 usb_phy_set_suspend(omap->phy[i], 0);
195 }
190 } 196 }
191 197
192 pm_runtime_enable(dev); 198 pm_runtime_enable(dev);
@@ -211,13 +217,14 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
211 } 217 }
212 218
213 /* 219 /*
214 * Bring PHYs out of reset. 220 * Bring PHYs out of reset for non PHY modes.
215 * Even though HSIC mode is a PHY-less mode, the reset 221 * Even though HSIC mode is a PHY-less mode, the reset
216 * line exists between the chips and can be modelled 222 * line exists between the chips and can be modelled
217 * as a PHY device for reset control. 223 * as a PHY device for reset control.
218 */ 224 */
219 for (i = 0; i < omap->nports; i++) { 225 for (i = 0; i < omap->nports; i++) {
220 if (!omap->phy[i]) 226 if (!omap->phy[i] ||
227 pdata->port_mode[i] == OMAP_EHCI_PORT_MODE_PHY)
221 continue; 228 continue;
222 229
223 usb_phy_init(omap->phy[i]); 230 usb_phy_init(omap->phy[i]);