From: shweta.gulati@ti.com (Gulati, Shweta)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] OMAP: Added recalculation of clock rate in 'clk_set_rate'
Date: Thu, 21 Apr 2011 19:02:43 +0530 [thread overview]
Message-ID: <BANLkTi=Ab0EJ3fAQGHBOyPd+eAJHWcjtuA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1104201351180.12683@utopia.booyaka.com>
Hi,
On Thu, Apr 21, 2011 at 1:25 AM, Paul Walmsley <paul@pwsan.com> wrote:
> Hi
>
> On Wed, 20 Apr 2011, Shweta Gulati wrote:
>
>> From: Gulati, Shweta <shweta.gulati@ti.com>
>>
>> Core Clk Tree shows incorrect Clk rates at OPP50, as
>> in commit e07f469d284ca3d1f5dcf5438c22982be98bc071
>> calling of 'recalc' in API clk_set_rate is unintentionally
>> removed,
>
> That's intentional. ?struct clk.set_rate functions need to set the struct
> clk.rate before returning. ?If they don't do that, it's a bug in the
> struct clk's .set_rate function.
Yes, but in current code clk_set_rate of dpll3_m2 -
'omap3_core_dpll_m2_set_rate'
doesn't update clk.rate, I will submit patch fixing that bug and will
make sure that
set_rate of all clocks should update clk.rate
>
>> because of which clock's tree rates get goofed up when DVFS happens.
>
> Clearly this isn't on the mainline kernel...
If you check for OPP50, the core clocks would show wrong rates.
Thanks for reviewing.
>
>> This Patch adds recalc API back.
>>
>> Tested on OMAP3630 SDP Board.
>>
>> Signed-off-by: Shweta Gulati <shweta.gulati@ti.com>
>> Cc: Rajendra Nayak <rnayak@ti.com>
>> Cc: Paul Wamsley <paul@pwsan.com>
>> ---
>> ?arch/arm/plat-omap/clock.c | ? ?5 ++++-
>> ?1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
>> index c9122dd..5a0d06b 100644
>> --- a/arch/arm/plat-omap/clock.c
>> +++ b/arch/arm/plat-omap/clock.c
>> @@ -130,8 +130,11 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
>>
>> ? ? ? spin_lock_irqsave(&clockfw_lock, flags);
>> ? ? ? ret = arch_clock->clk_set_rate(clk, rate);
>> - ? ? if (ret == 0)
>> + ? ? if (ret == 0) {
>> + ? ? ? ? ? ? if (clk->recalc)
>> + ? ? ? ? ? ? ? ? ? ? clk->rate = clk->recalc(clk);
>> ? ? ? ? ? ? ? propagate_rate(clk);
>> + ? ? }
>> ? ? ? spin_unlock_irqrestore(&clockfw_lock, flags);
>>
>> ? ? ? return ret;
>> --
>> 1.7.0.4
>>
>
>
> - Paul
>
--
Thanks,
Regards,
Shweta
next prev parent reply other threads:[~2011-04-21 13:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 9:25 [PATCH] OMAP: Added recalculation of clock rate in 'clk_set_rate' Shweta Gulati
2011-04-20 13:35 ` Janorkar, Mayuresh
2011-04-21 13:27 ` Gulati, Shweta
2011-04-20 15:42 ` Sergei Shtylyov
2011-04-21 13:27 ` Gulati, Shweta
2011-04-20 19:55 ` Paul Walmsley
2011-04-21 13:32 ` Gulati, Shweta [this message]
2011-04-23 17:00 ` Paul Walmsley
2011-05-06 21:49 ` Paul Walmsley
2011-05-10 10:55 ` Gulati, Shweta
2011-05-10 13:42 ` Avinash.H.M.
2011-05-11 4:19 ` Gulati, Shweta
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='BANLkTi=Ab0EJ3fAQGHBOyPd+eAJHWcjtuA@mail.gmail.com' \
--to=shweta.gulati@ti.com \
--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).