Re: [RFC PATCH v1] usb: dwc2: reduce dwc2 driver probe time
From: Felipe Balbi
Date: Tue Feb 10 2015 - 09:47:52 EST
Hi,
On Tue, Feb 10, 2015 at 10:05:39PM +0800, Yunzhi Li wrote:
> 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.
do you know what's the upper boundary for AHB clock ? How fast can it
be? It's not wise to change timers because "it works on my RK3288
board", you need to guarantee that this won't break anybody else.
The only way to do that is to look at the architecture part of dwc2 and
see if there are any limits to how fast AHB clock can be.
Also, you're not even sure if it refers to AHB clock. Usually, you can
also change which clock source to use, so you need to cope with that as
well.
Please go back to your documentation and figure these out.
Thanks
--
balbi
Attachment:
signature.asc
Description: Digital signature