summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2016-04-27 03:08:12 +0200
committerMarek Vasut <[email protected]>2016-05-06 20:06:56 +0200
commitf647bf0ba36a5236d4bc7f93d39bfacfb1cfe6c7 (patch)
tree46fad17b63b065cf8783459a355d9aeded71d9c7
parent2f1b4302e352800b8b651a300281a7fae67cdf80 (diff)
usb: Wait after sending Set Configuration request
Some devices, like the SanDisk Cruzer Pop need some time to process the Set Configuration request, so wait a little until they are ready. Signed-off-by: Marek Vasut <[email protected]> Cc: Chin Liang See <[email protected]> Cc: Dinh Nguyen <[email protected]> Cc: Hans de Goede <[email protected]> Cc: Stefan Roese <[email protected]> Cc: Stephen Warren <[email protected]>
-rw-r--r--common/usb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/usb.c b/common/usb.c
index 63429d4d5a9..205041b6a62 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -1107,6 +1107,14 @@ int usb_select_config(struct usb_device *dev)
"len %d, status %lX\n", dev->act_len, dev->status);
return err;
}
+
+ /*
+ * Wait until the Set Configuration request gets processed by the
+ * device. This is required by at least SanDisk Cruzer Pop USB 2.0
+ * and Kingston DT Ultimate 32GB USB 3.0 on DWC2 OTG controller.
+ */
+ mdelay(10);
+
debug("new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
dev->descriptor.iManufacturer, dev->descriptor.iProduct,
dev->descriptor.iSerialNumber);