summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorValentin Longchamp <valentin.longchamp@epfl.ch>2010-01-20 19:43:23 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:53:05 -0800
commit2f0e40aba1cafe3a834bfcbac8f1e704d496dab9 (patch)
treea59d03a1311fb20bef9950962f5e8f6c61ef97fe /drivers/usb
parentcabe6cc2be287d0020d70944e8d0d0304e484a6c (diff)
downloadop-kernel-dev-2f0e40aba1cafe3a834bfcbac8f1e704d496dab9.zip
op-kernel-dev-2f0e40aba1cafe3a834bfcbac8f1e704d496dab9.tar.gz
USB: fix occasional ULPI timeouts with ehci-mxc
On various mxc boards, the intial ULPI reads resulted in a timeout which prevented the transceiver to be identified and thus the ehci device to be probed. Initializing the hardware lines connected to the transceiver (through pdata->init call) before actually enabling clocks and configuring registers in the devices fixes this problem. Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-mxc.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index 35c56f4..23cd917 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -162,6 +162,17 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
goto err_ioremap;
}
+ /* call platform specific init function */
+ if (pdata->init) {
+ ret = pdata->init(pdev);
+ if (ret) {
+ dev_err(dev, "platform init failed\n");
+ goto err_init;
+ }
+ /* platforms need some time to settle changed IO settings */
+ mdelay(10);
+ }
+
/* enable clocks */
priv->usbclk = clk_get(dev, "usb");
if (IS_ERR(priv->usbclk)) {
@@ -192,18 +203,6 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
if (ret < 0)
goto err_init;
- /* call platform specific init function */
- if (pdata->init) {
- ret = pdata->init(pdev);
- if (ret) {
- dev_err(dev, "platform init failed\n");
- goto err_init;
- }
- }
-
- /* most platforms need some time to settle changed IO settings */
- mdelay(10);
-
/* Initialize the transceiver */
if (pdata->otg) {
pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET;
OpenPOWER on IntegriCloud