linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] fix occasional ULPI timeouts with ehci-mxc
@ 2009-12-02 16:13 Valentin Longchamp
  2009-12-02 16:49 ` Daniel Mack
  2009-12-02 18:58 ` Alan Carvalho de Assis
  0 siblings, 2 replies; 18+ messages in thread
From: Valentin Longchamp @ 2009-12-02 16:13 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/usb/host/ehci-mxc.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index 35c56f4..689b683 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -162,6 +162,15 @@ 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;
+		}
+	}
+
 	/* enable clocks */
 	priv->usbclk = clk_get(dev, "usb");
 	if (IS_ERR(priv->usbclk)) {
@@ -192,15 +201,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);
 
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-12-04  7:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02 16:13 [PATCH 1/1] fix occasional ULPI timeouts with ehci-mxc Valentin Longchamp
2009-12-02 16:49 ` Daniel Mack
2009-12-02 17:05   ` Valentin Longchamp
2009-12-03 10:35     ` Valentin Longchamp
2009-12-03 10:55       ` Daniel Mack
2009-12-02 17:36   ` Eric Bénard
2009-12-02 18:58 ` Alan Carvalho de Assis
2009-12-02 19:35   ` Andy Green
2009-12-02 20:25     ` Alan Carvalho de Assis
2009-12-02 21:13       ` Andy Green
2009-12-03  8:03         ` Valentin Longchamp
2009-12-03 14:45         ` Alan Carvalho de Assis
2009-12-03 14:53           ` Andy Green
2009-12-03 16:21             ` Alan Carvalho de Assis
2009-12-03 16:29               ` Daniel Mack
2009-12-03 16:37                 ` Alan Carvalho de Assis
2009-12-03 19:36               ` Robert Schwebel
2009-12-04  7:45                 ` javier Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).