dwc_otg_hcd: Add delay before controller initialization
It has been observed that the controller doesn't work properly when the
kernel console is connected to a vterm (which affects timing).
Experiments have shown that the problem can be fixed with a delay of at
least 60ms before the controller initialization. A delay of 200ms is
used to add some margin.
Change-Id: I19f14898747bfc29cdad5b2806a69b5a8edebd50
Google-Bug-Id: 26006801
diff --git a/drivers/usb/dwc_otg/dwc_otg_hcd.c b/drivers/usb/dwc_otg/dwc_otg_hcd.c
index 480bf20..9617c6c 100755
--- a/drivers/usb/dwc_otg/dwc_otg_hcd.c
+++ b/drivers/usb/dwc_otg/dwc_otg_hcd.c
@@ -904,6 +904,15 @@
dwc_hc_t *channel;
dwc_hc_t *channel_tmp;
+ /*
+ * It has been observed that the controller doesn't work properly
+ * when the kernel console is connected to a vterm (which affects
+ * timing). Experiments have shown that the problem can be fixed
+ * with a delay of at least 60ms before starting the controller
+ * initialization. A delay of 200ms is used to add some margin
+ */
+ msleep(200);
+
hcd->flags.d32 = 0;
hcd->non_periodic_qh_ptr = &hcd->non_periodic_sched_active;