linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: smp_twd: reprogram twd based on clk notifier
Date: Fri, 07 Sep 2012 14:59:27 -0700	[thread overview]
Message-ID: <20120907215927.20289.29648@nucleus> (raw)
In-Reply-To: <CAPDyKFrWGKP+jNcti939-ARp_Q8ugLUrdSn9pb59v24nH=D36A@mail.gmail.com>

Quoting Ulf Hansson (2012-09-07 06:26:21)
> On 7 September 2012 14:40, Shawn Guo <shawn.guo@linaro.org> wrote:
> > On Fri, Sep 07, 2012 at 01:59:40PM +0200, Ulf Hansson wrote:
> >> Hi Shawn and Mike,
> >>
> >> In general I am in favor of this patch, but I also see some
> >> corresponding problems to resolve. Please correct me if I am wrong.
> >>
> >> I suppose most machines is relying on that it enough to only take care
> >> of the notification by using "cpufreq_notify_transition" from their
> >> cpufreq drivers. Thus those have to make sure the updates for smp_twd
> >> clock is supported from within the cpufreq driver I suppose.
> >>
> >> In other words the cpufreq drivers needs to do clk_get of "smp_twd"
> >> clock and then do a set_rate on it when it's has changed, to trigger a
> >> rate change notification. Is this what you also have in mind or do you
> >> have any other idea of how this should work?
> >>
> > Here is how it works on imx6q.
> >
> > 1) There are clks arm and twd defined in imx6q clock tree.  And twd
> >    is registered to clock framework as one child of arm clk with a fixed
> >    divider 2.
> >
> >         /*                                    name         parent_name     mult div */
> >         clk[twd]       = imx_clk_fixed_factor("twd",       "arm",            1, 2);
> >
> > 2) Register lookup "cpu0" and "smp_twd" for cpufreq and smp_twd drivers
> >    respectively.
> >
> >         clk_register_clkdev(clk[twd], NULL, "smp_twd");
> >         clk_register_clkdev(clk[arm], NULL, "cpu0");
> >
> > That's it.  The clock framework will just handle all the work nicely.
> > When cpufreq driver scales arm clk, the framework will propagate the
> > rate change to twd clk automatically.  And once twd clk rate changes,
> > smp_twd will get the notification.
> >
> 
> That's a nice solution!
> This won't work for ux500 that simple though. Maybe I might be able to
> use some kind of clock "parent" thing though, let's see. Thanks for
> the information!

Hi Ulf,

Why won't this work for ux500?

Thanks,
Mike

> 
> Kind regards
> Ulf Hansson
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2012-09-07 21:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07  8:19 [PATCH] ARM: smp_twd: reprogram twd based on clk notifier Shawn Guo
2012-09-07 11:59 ` Ulf Hansson
2012-09-07 12:40   ` Shawn Guo
2012-09-07 13:26     ` Ulf Hansson
2012-09-07 21:59       ` Mike Turquette [this message]
2012-09-10 11:22         ` Ulf Hansson
2012-09-10 11:27           ` Shilimkar, Santosh
2012-09-12 15:06 ` Shawn Guo
2012-09-12 16:05 ` Linus Walleij
2012-09-12 16:07   ` Linus Walleij
2012-09-12 20:32     ` Mike Turquette
2012-09-12 22:44       ` [PATCH v2] " Mike Turquette
2012-09-13 12:51         ` Linus Walleij
2012-09-13 21:05           ` Mike Turquette
2012-09-13 13:05         ` Ulf Hansson
2012-09-12 20:47 ` [PATCH] " Stephen Warren

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=20120907215927.20289.29648@nucleus \
    --to=mturquette@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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).