From: daniel@caiaq.de (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] fix occasional ULPI timeouts with ehci-mxc
Date: Thu, 3 Dec 2009 11:55:34 +0100 [thread overview]
Message-ID: <20091203105534.GN14091@buzzloop.caiaq.de> (raw)
In-Reply-To: <1259836558-3007-1-git-send-email-valentin.longchamp@epfl.ch>
On Thu, Dec 03, 2009 at 11:35:58AM +0100, Valentin Longchamp wrote:
> 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>
Acked-by: Daniel Mack <daniel@caiaq.de>
> ---
> drivers/usb/host/ehci-mxc.c | 23 +++++++++++------------
> 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;
> --
> 1.6.3.3
>
next prev parent reply other threads:[~2009-12-03 10:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091203105534.GN14091@buzzloop.caiaq.de \
--to=daniel@caiaq.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).