From: Chris Ball <cjb@laptop.org>
To: Chanho Park <chanho61.park@samsung.com>
Cc: linux-mmc@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH] mmc: core: remove waiting time when clkgate_delay is set
Date: Fri, 02 Mar 2012 16:12:19 -0500 [thread overview]
Message-ID: <m2aa3yn1vw.fsf@bob.laptop.org> (raw)
In-Reply-To: <1330494769-7558-1-git-send-email-chanho61.park@samsung.com> (Chanho Park's message of "Wed, 29 Feb 2012 14:52:49 +0900")
Hi,
On Wed, Feb 29 2012, Chanho Park wrote:
> Since recent commit("mmc: core: Use delayed work in clock gating
> framework":597dd9d79cfbbb1), we always wait "unnecessary" default
> clock delay(8 cycles). Actually, we don't need it if clkgate_delay
> (unit:ms) is set because we already wait sufficient time to change
> the clock due to delayed_workqueue.
> This patch removes duplicated waiting time when clkgate_delay is set.
>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/mmc/core/host.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> index c3704e2..d710ce0 100644
> --- a/drivers/mmc/core/host.c
> +++ b/drivers/mmc/core/host.c
> @@ -109,8 +109,11 @@ static void mmc_host_clk_gate_delayed(struct mmc_host *host)
> */
> if (!host->clk_requests) {
> spin_unlock_irqrestore(&host->clk_lock, flags);
> - tick_ns = DIV_ROUND_UP(1000000000, freq);
> - ndelay(host->clk_delay * tick_ns);
> + /* wait only when clk_gate_delay is 0*/
> + if (!host->clkgate_delay) {
> + tick_ns = DIV_ROUND_UP(1000000000, freq);
> + ndelay(host->clk_delay * tick_ns);
> + }
> } else {
> /* New users appeared while waiting for this work */
> spin_unlock_irqrestore(&host->clk_lock, flags);
Have you seen Guennadi's patch?
http://git.kernel.org/?p=linux/kernel/git/cjb/mmc.git;a=commitdiff;h=63871af54a0f0053de6534afe8da101b988b86b6
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2012-03-02 21:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 5:52 [PATCH] mmc: core: remove waiting time when clkgate_delay is set Chanho Park
2012-03-01 6:34 ` Sujit Reddy Thumma
2012-03-02 21:12 ` Chris Ball [this message]
2012-03-04 23:39 ` Chanho Park
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=m2aa3yn1vw.fsf@bob.laptop.org \
--to=cjb@laptop.org \
--cc=chanho61.park@samsung.com \
--cc=g.liakhovetski@gmx.de \
--cc=kyungmin.park@samsung.com \
--cc=linux-mmc@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).