All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH] usb: dwc2: Add small delay after reset
Date: Mon, 23 Dec 2019 12:58:44 +0100	[thread overview]
Message-ID: <097cb601-6ff5-0a95-0af0-58998fdaa867@denx.de> (raw)
In-Reply-To: <1577088452-3684-1-git-send-email-ley.foon.tan@intel.com>

On 12/23/19 9:07 AM, Ley Foon Tan wrote:
> In Cyclone 5 SoC platform, the first USB probing is failed but second
> probing is success. DWC2 driver read gsnpsid register right after de-assert
> reset, but controller is not ready yet and it returns gsnpsid 0.
> Adding small delay after de-assert reset solve the issue.
> 
> Retry with this fix more than 10 times without issue.
> 
> => usb reset
> resetting USB...
> Bus usb at ffb40000: usb probe
> SNPSID invalid (not DWC2 OTG device): 00000000
> Port not available.
> => usb reset
> resetting USB...
> Bus usb at ffb40000: usb probe
> scanning bus usb at ffb40000 for devices... 2 USB Device(s) found
>        scanning usb for storage devices... 1 Storage Device(s) found

Can't you poll for the readiness of the IP somehow instead of using
arbitrary delay ?

  reply	other threads:[~2019-12-23 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23  8:07 [PATCH] usb: dwc2: Add small delay after reset Ley Foon Tan
2019-12-23 11:58 ` Marek Vasut [this message]
2019-12-24  2:00   ` Tan, Ley Foon

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=097cb601-6ff5-0a95-0af0-58998fdaa867@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.