From: Roy <yunzhi.li@foxmail.com>
To: johnyoun@synopsys.com, Felipe Balbi <balbi@ti.com>
Cc: "Yunzhi Li" <lyz@rock-chips.com>,
jwerner@chromium.org, gregory.herrero@intel.com,
yousaf.kaukab@intel.com, r.baldyga@samsung.com,
"Dinh Nguyen" <dinguyen@opensource.altera.com>,
"Eddie Cai" <cf@rock-chips.com>, "Lin Huang" <hl@rock-chips.com>,
wulf <wulf@rock-chips.com>, 杨凯 <yk@rock-chips.com>,
"Tao Huang" <huangtao@rock-chips.com>,
walkrain@126.com, "Douglas Anderson" <dianders@chromium.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v1] usb: dwc2: reduce dwc2 driver probe time
Date: Wed, 11 Feb 2015 19:40:47 +0800 [thread overview]
Message-ID: <54DB3FBF.7010003@foxmail.com> (raw)
In-Reply-To: <CAODwPW_CqBTq38ApDOB6naVBoWbuKxKN668hqV8UDb4URHEgYQ@mail.gmail.com>
Hi John Youn:
Could you please give some suggestions from your point of view,
about this probe time issue ?
Thanks a lot.
at 2015/2/11 2:23, Julius Werner wrote:
>> @@ -2703,7 +2703,7 @@ int dwc2_get_hwparams(struct dwc2_hsotg *hsotg)
>> gusbcfg = readl(hsotg->regs + GUSBCFG);
>> gusbcfg &= ~GUSBCFG_FORCEHOSTMODE;
>> writel(gusbcfg, hsotg->regs + GUSBCFG);
>> - usleep_range(100000, 150000);
>> + usleep_range(25000, 50000);
> The point of usleep_range() is to coalesce multiple timer interrupts
> in idle systems for power efficiency. It's pretty pointless/harmful
> during probe anyway and there's almost never a reason to make the span
> larger than a few milliseconds. You should reduce this to something
> reasonable (e.g. usleep_range(25000, 26000) or even
> usleep_range(25000, 25000)) to save another chunk of time. Same
> applies to other delays above.
>
>> 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.
> But this code is already a loop that spins on the AHBIdle bit, right?
> It should work correctly regardless of the delay. The only question is
> whether the code could be more efficient with a longer sleep... but
> since the general recommendation is to delay for ranges less than
> 10us, and the AHB clock would need to be lower than 100KHz (the ones I
> see are usually in the range of tens or hundreds of MHz) to take
> longer than that, this seems reasonable to me.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
--------
Roy Li @ Rockchip
next prev parent reply other threads:[~2015-02-11 11:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 14:05 [RFC PATCH v1] usb: dwc2: reduce dwc2 driver probe time Yunzhi Li
2015-02-10 14:47 ` Felipe Balbi
2015-02-10 18:23 ` Julius Werner
2015-02-11 11:40 ` Roy [this message]
2015-02-12 3:33 ` John Youn
2015-02-12 13:21 ` Kaukab, Yousaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54DB3FBF.7010003@foxmail.com \
--to=yunzhi.li@foxmail.com \
--cc=balbi@ti.com \
--cc=cf@rock-chips.com \
--cc=dianders@chromium.org \
--cc=dinguyen@opensource.altera.com \
--cc=gregkh@linuxfoundation.org \
--cc=gregory.herrero@intel.com \
--cc=hl@rock-chips.com \
--cc=huangtao@rock-chips.com \
--cc=johnyoun@synopsys.com \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lyz@rock-chips.com \
--cc=r.baldyga@samsung.com \
--cc=walkrain@126.com \
--cc=wulf@rock-chips.com \
--cc=yk@rock-chips.com \
--cc=yousaf.kaukab@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox