summaryrefslogtreecommitdiffstats
path: root/include/usb.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-01-11 20:34:51 +0100
committerMarek Vasut <marex@denx.de>2015-01-18 12:31:36 +0100
commit90cdc1039d0bf6d85bb497dbb93d317ad234e846 (patch)
tree753472c23d0d45336216db7e9a6c06634c71f732 /include/usb.h
parente8672e3f0ec571d0ca7ccd8cbbeb113802c1d443 (diff)
downloadblackbird-obmc-uboot-90cdc1039d0bf6d85bb497dbb93d317ad234e846.tar.gz
blackbird-obmc-uboot-90cdc1039d0bf6d85bb497dbb93d317ad234e846.zip
musb-new: Fix reset sequence when in host mode
This commit fixes a number of issues with the reset sequence of musb-new in host mode: 1) Our usb device probe relies on a second device reset being done after the first descriptors read. Factor the musb reset code into a usb_reset_root_port function (and add this as an empty define for other controllers), and call this when a device has no parent. 2) Just like with normal usb controllers there needs to be a delay after reset, for normal usb controllers, this is handled in hub_port_reset, add a delay to usb_reset_root_port. 3) Sync the musb reset sequence with the upstream kernel, clear all bits of power except bits 4-7, and increase the time reset is asserted to 50 ms. With these fixes an usb keyboard I have now always enumerates properly, where as earlier it would only enumerare properly once every 5 tries. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'include/usb.h')
-rw-r--r--include/usb.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/usb.h b/include/usb.h
index b921a7f856..a083591ba0 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -159,6 +159,11 @@ enum usb_init_type {
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller);
int usb_lowlevel_stop(int index);
+#ifdef CONFIG_MUSB_HOST
+void usb_reset_root_port(void);
+#else
+#define usb_reset_root_port()
+#endif
int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
void *buffer, int transfer_len);
OpenPOWER on IntegriCloud