aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorColin Cross <ccross@google.com>2011-06-06 22:05:29 -0400
committerKevin Hilman <khilman@ti.com>2011-11-08 14:42:16 -0500
commit022ac03b45d6899219539894cff3c7ce5bd990f9 (patch)
treea2af4639ec51a2b58e4bc27531bad2dfa4f3693e /drivers/cpufreq
parented8ce00c52fb49aca299b79513bbfcee975442bc (diff)
cpufreq: OMAP: notify even with bad boot frequency
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> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/omap-cpufreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 3f5a816a64be..0a5d95c4f8eb 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -97,7 +97,7 @@ static int omap_target(struct cpufreq_policy *policy,
97 freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; 97 freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
98 freqs.cpu = policy->cpu; 98 freqs.cpu = policy->cpu;
99 99
100 if (freqs.old == freqs.new) 100 if (freqs.old == freqs.new && policy->cur == freqs.new)
101 return ret; 101 return ret;
102 102
103 /* notifiers */ 103 /* notifiers */