public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Igor Stoppa <igor.stoppa@nokia.com>
To: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] OMAP: Asynchronous clock disable
Date: Fri, 05 Oct 2007 16:25:59 +0300	[thread overview]
Message-ID: <1191590759.7611.13.camel@localhost.localdomain> (raw)
In-Reply-To: <20071005125028.GA32101@angel.research.nokia.com>

Hi,

On Fri, 2007-10-05 at 15:50 +0300, ext Jarkko Lavinen wrote:
> Hi
> 
> In N800 mmc driver we enable and disable mmc clock in a continous
> cycle with small delays.
> 
> I wonder if asynchronou clock disable has been suggested before?
> 
> I would like to be able to disable clocks asynchronously with a
> small delay so that when doing repetitive clk enable/disable
> cycle, the clock would just stay up and only shut down when
> the continuos stream of requests is over.

This could be applied also to other cases:
-PLL locking/relocking (however this is quite fast)
-external oscillator enabling/disabling; this can introduce significant
latency, so the oscillator would beleft running and OMAP could still go
to clock stop, rather than the current implementation which prevents
retention

> What I would like to do is:

<snip>

> For clearing up pending clock disables I use clk_flush_disable(clk)
> clears out any pending disable immediately.
> 
>      clk_enable(clk);
>      clk_disable_async(clk, HZ);
>      ... later
>      clk_flush_disable(clk)

This is ok but anyway i don't see it as being badly needed since in a
practical use case it would be probably used after a long sequence:

do {
	clk_enable(clk);
	do_something_requiring_clk();
	clk_disable_async(clk, HZ);
} while (work_left());
clk_flush_disable(clk);


so i expect the improvement to be minimal to the case where the timer is
left to expire (i assume the timer won't be too long, otherwise the
clock would have been released for good every time)

-- 
Cheers, Igor

Igor Stoppa <igor.stoppa@nokia.com>
(Nokia Multimedia - CP - OSSO / Helsinki, Finland)

  reply	other threads:[~2007-10-05 13:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 12:50 [PATCH] OMAP: Asynchronous clock disable Jarkko Lavinen
2007-10-05 13:25 ` Igor Stoppa [this message]
2007-10-05 13:27 ` Woodruff, Richard
2007-10-08  3:51   ` Tony Lindgren
2007-10-09 22:17     ` Woodruff, Richard

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=1191590759.7611.13.camel@localhost.localdomain \
    --to=igor.stoppa@nokia.com \
    --cc=jarkko.lavinen@nokia.com \
    --cc=linux-omap-open-source@linux.omap.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