linux/drivers/usb/dwc2
Yunzhi Li 20bde64343 usb: dwc2: reduce dwc2 driver probe time
I found that the probe function of dwc2 driver takes much time
when kernel boot up. There are many long delays in the probe
function these take almost 1 second.

This patch trying to reduce unnecessary delay time.

In dwc2_core_reset() I see it use two at least 20ms delays to
wait AHB idle and core soft reset, but dwc2 data book said that
dwc2 core soft reset and AHB idle just need a few clocks (I think
it refers to AHB clock, and AHB clock run at 150MHz in my RK3288
board), so 20ms is too long, delay 1us for wait AHB idle and soft
reset is enough.

And in dwc2_get_hwparams() it takes 150ms to wait ForceHostMode
and ForceDeviceMode valid but in data book it said software must
wait at least 25ms before the change to take effect, so I reduce
this time to 25ms~50ms. By the way, is there any state bit show
that the force mode take effect ? Could we poll curmod bit for
figuring out if the change take effect ?

It seems that usleep_range() at boot time will pick the longest
value in the range. In dwc2_core_reset() there is a very long
delay takes 200ms, and this function run twice when probe, could
any one tell me is this delay time resonable ?

I have tried this patch in my RK3288-evb board. It works well.

Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-12-22 11:54:16 -06:00
..
core_intr.c usb: dwc2: host: Clear interrupts before handling them 2015-12-15 09:12:41 -06:00
core.c usb: dwc2: reduce dwc2 driver probe time 2015-12-22 11:54:16 -06:00
core.h usb: dwc2: Avoid double-reset at boot time 2015-12-22 11:52:08 -06:00
debug.h usb: dwc2: move debugfs code to a separate file 2015-04-29 15:18:25 -05:00
debugfs.c usb: dwc2: Use platform endianness when accessing registers 2015-09-27 10:54:31 -05:00
gadget.c usb: dwc2: gadget: don't overwrite DCTL register on NAKEFF interrupts 2015-12-22 11:50:43 -06:00
hcd_ddma.c usb: dwc2: host: use kmem cache to allocate descriptors 2015-12-15 09:12:41 -06:00
hcd_intr.c usb: dwc2: host: Clear interrupts before handling them 2015-12-15 09:12:41 -06:00
hcd_queue.c usb: dwc2: host: enable descriptor dma for fs devices 2015-12-15 09:12:41 -06:00
hcd.c usb: dwc2: Avoid double-reset at boot time 2015-12-22 11:52:08 -06:00
hcd.h usb: dwc2: host: avoid usage of dma_alloc_coherent with irqs disabled 2015-12-15 09:12:41 -06:00
hw.h usb: dwc2: host: fix descriptor list address masking 2015-12-15 09:12:41 -06:00
Kconfig usb: dwc2: remove dwc2_platform.ko 2015-04-29 15:20:11 -05:00
Makefile usb: dwc2: remove dwc2_platform.ko 2015-04-29 15:20:11 -05:00
pci.c usb: dwc2: pci: Add device mode to the dwc2-pci driver 2015-03-11 15:08:17 -05:00
platform.c usb: dwc2: reset dwc2 core before dwc2_get_hwparams() 2015-12-22 11:51:45 -06:00