From: Nishanth Menon <nm@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: kevin <khilman@ti.com>, Colin Cross <ccross@google.com>
Subject: [pm-wip/cpufreq][PATCH 2/3] OMAP2+: cpufreq: notify even with bad boot frequency
Date: Mon, 6 Jun 2011 21:05:29 -0500 [thread overview]
Message-ID: <1307412330-25798-3-git-send-email-nm@ti.com> (raw)
In-Reply-To: <1307412330-25798-1-git-send-email-nm@ti.com>
From: Colin Cross <ccross@google.com>
Sometimes, bootloaders starts up with a frequency which is not
in the OPP table. At cpu_init, policy->cur contains the frequency
we pick at boot. It is possible that system might have fixed
it's boot frequency later on as part of power initialization.
After this condition, the first call to omap_target results in the
following:
omap_getspeed(actual device frequency) != policy->cur(frequency that
cpufreq thinks that the system is at), and it is possible that
freqs.old == freqs.new (because the governor requested a scale down).
We exit without triggering the notifiers in the current code, which
does'nt let code which depends on cpufreq_notify_transition to have
accurate information as to what the system frequency is.
Instead, we do a normal transition if policy->cur is wrong, then,
freqs.old will be the actual cpu frequency, freqs.new will be the
actual new cpu frequency and all required notifiers have the accurate
information.
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Colin Cross <ccross@google.com>
---
arch/arm/mach-omap2/omap2plus-cpufreq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
index a962a31..2177381 100644
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
@@ -97,7 +97,7 @@ static int omap_target(struct cpufreq_policy *policy,
freqs.old = omap_getspeed(policy->cpu);
freqs.cpu = policy->cpu;
- if (freqs.old == freqs.new)
+ if (freqs.old == freqs.new && policy->cur == freqs.new)
return ret;
if (!is_smp()) {
--
1.7.1
next prev parent reply other threads:[~2011-06-07 2:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 2:05 [pm-wip/cpufreq][PATCH 0/3] OMAP2+: cpufreq: fixes Nishanth Menon
2011-06-07 2:05 ` [pm-wip/cpufreq][PATCH 1/3] OMAP2+: cpufreq: minor flow beautification Nishanth Menon
2011-06-07 19:07 ` Kevin Hilman
2011-06-07 2:05 ` Nishanth Menon [this message]
2011-06-07 2:05 ` [pm-wip/cpufreq][PATCH 3/3] OMAP2+: cpufreq: do lateinit Nishanth Menon
2011-06-07 8:15 ` Santosh Shilimkar
2011-06-07 12:38 ` Menon, Nishanth
2011-06-07 21:49 ` Kevin Hilman
2011-06-08 0:28 ` Menon, Nishanth
2011-06-08 18:51 ` Kevin Hilman
2011-06-08 18:59 ` Menon, Nishanth
2011-06-08 21:03 ` Kevin Hilman
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=1307412330-25798-3-git-send-email-nm@ti.com \
--to=nm@ti.com \
--cc=ccross@google.com \
--cc=khilman@ti.com \
--cc=linux-omap@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