mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Subject: [PATCH 3/3] usb: use ep-specific pwrgood delay
Date: Thu, 30 Aug 2012 14:30:50 +0200	[thread overview]
Message-ID: <1346329850-3866-4-git-send-email-s.trumtrar@pengutronix.de> (raw)
In-Reply-To: <1346329850-3866-1-git-send-email-s.trumtrar@pengutronix.de>

In usb_hub_configure the hub is asked for its descriptor and among other things
its bPwrOn2PwrGood time. In the actual hub_power_on function this information
was not used and a hardcoded value was used instead. For some hubs this delay
is to short. So, use the delay the hub wants.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 drivers/usb/core/usb.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 81ae9f1..48bc121 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -948,7 +948,8 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
 		usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
 		USB_HUB_PRINTF("port %d returns %lX\n", i + 1, dev->status);
 	}
-	mdelay(20);
+	/* power on is encoded in 2ms increments -> times 2 for the actual delay */
+	mdelay(hub->desc.bPwrOn2PwrGood*2);
 }
 
 #define MAX_TRIES 5
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-08-30 12:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 12:30 [PATCH 0/3] ARM i.MX6: basic USB H1 support Steffen Trumtrar
2012-08-30 12:30 ` [PATCH 1/3] ARM i.MX6: add the usbphy1 base addr Steffen Trumtrar
2012-08-30 12:30 ` [PATCH 2/3] ARM i.MX6: enable usbphy1 Steffen Trumtrar
2012-08-30 12:30 ` Steffen Trumtrar [this message]
2012-08-30 13:03   ` [PATCH 3/3] usb: use ep-specific pwrgood delay Eric Bénard
2012-08-30 13:26     ` Steffen Trumtrar
2012-08-30 13:59       ` Eric Bénard
2012-08-30 14:12         ` Steffen Trumtrar
2012-08-30 14:18           ` Eric Bénard
2012-08-31  7:33 ` [PATCH 0/3] ARM i.MX6: basic USB H1 support Sascha Hauer
2012-08-31  7:43   ` Eric Bénard

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=1346329850-3866-4-git-send-email-s.trumtrar@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --cc=barebox@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