All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 0/2] OMAP clock: implement clock rate/parent change notifiers
Date: Wed, 25 Mar 2009 10:54:15 -0700	[thread overview]
Message-ID: <87tz5hwks8.fsf@deeprootsystems.com> (raw)
In-Reply-To: <20090325160759.31866.49722.stgit@localhost.localdomain> (Paul Walmsley's message of "Wed\, 25 Mar 2009 10\:09\:19 -0600")

Paul Walmsley <paul@pwsan.com> writes:

> Hello,
>
> This series allows core code and driver code to register for
> notification when a clock's rate or parent changes.  This is currently
> used by driver code that must be notified whenever power management
> code (e.g., CPUFreq) causes system rate changes that affect the driver's
> clock.

I will be re-basing the PM branch onto today's linux-omap HEAD which
is v2.6.29 based.  As I do this, I'll be dropping all the previous
notifier patches and replacing them with this series.

Kevin

> There are three notifier messages: 
>
> 1. a pre-change notifier, called before the change; 
>
> 2. a post-change notifier, called after the change; and
>
> 3. an abort notifier, called if the change fails for any reason after
>    the pre-change notifier callbacks have run.
>
> Since the implementation uses a blocking notifier, notifier code may
> block waiting for devices to quiesce; but long delays here will reduce
> the effectiveness of DVFS.  Since notifier callbacks are called with
> clocks_mutex held, callback code must not re-enter the clock framework.
>
> Pre-change notifiers are passed the current clock rate and the desired
> clock rate, so drivers can adjust any internal dividers appropriately.
> (To minimize performance and memory usage impact, post-change
> notifiers are passed only the desired clock rate, i.e., the clock rate
> after the rate change.)  The notifiers are called even if the clock
> rate is the same before and after the change.  This is because
> reprogramming a clock's parent or rate may briefly disrupt the clock.
>
> The interface to the notifiers is via:
>
> int clk_notifier_register(struct clk *clk, struct notifier_block *nb);
> int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb);
>
> Until prototypes for these functions are made available in
> include/linux/clk.h, drivers should pass function pointers to
> clk_notifier_register() and clk_notifier_unregister() via their
> platform_data struct.
>
> This series is a collaboration between Tero Kristo
> <tero.kristo@nokia.com> and Paul Walmsley <paul@pwsan.com> and several
> others. Hiroshi Doyu <Hiroshi.DOYU@nokia.com> tracked down and fixed a
> bug where blocking_notifier_chain_*() were called while interrupts
> were disabled.  Nishanth Menon <nm@ti.com> found and fixed a bug in
> the clk_notifier_unregister() path, where a list_del() was missing.
> And thanks to Jouni Högander <jouni.hogander@nokia.com> for comments
> and review during the evolution of these patches.
>
> Registration and callbacks on rate change and parent change tested on
> BeagleBoard (OMAP3530 ES2.1).
>
> Comments welcomed.
>
> ---
>
>    text    data     bss     dec     hex filename
> 3439981  175136  111800 3726917  38de45 vmlinux.beagle.orig
> 3441545  176000  111800 3729345  38e7c1 vmlinux.beagle
>
>
>  arch/arm/mach-omap2/clock.c             |   30 ++++
>  arch/arm/mach-omap2/clock.h             |    1 
>  arch/arm/mach-omap2/clock24xx.c         |    1 
>  arch/arm/mach-omap2/clock34xx.c         |    1 
>  arch/arm/plat-omap/clock.c              |  256 +++++++++++++++++++++++++++++++
>  arch/arm/plat-omap/include/mach/clock.h |   68 ++++++++
>  6 files changed, 357 insertions(+), 0 deletions(-)
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-03-25 17:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25 16:09 [PATCH 0/2] OMAP clock: implement clock rate/parent change notifiers Paul Walmsley
2009-03-25 16:09 ` [PATCH 1/2] OMAP clock: add clk_round_rate_parent (with OMAP2/3 implementation) Paul Walmsley
2009-03-25 16:09 ` [PATCH 2/2] OMAP2/3 clock: implement clock rate/parent change notifiers Paul Walmsley
2009-03-25 17:54 ` Kevin Hilman [this message]
2011-08-14  7:39   ` [PATCH 0/2] OMAP " Felipe Contreras
2011-12-08 19:26     ` Paul Walmsley
2011-12-08 19:56       ` Felipe Contreras

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=87tz5hwks8.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.