Skip to content

Commit

Permalink
cpufreq: SPEAr: Notify all policy->cpus of frequency change
Browse files Browse the repository at this point in the history
SPEAr cpufreq driver supports dual core Cortex-A9 SoC's, where cpus share policy
structure. Whenever we update frequency of a cpu, we must notify all
policy->cpus.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Viresh Kumar authored and Rafael J. Wysocki committed Feb 1, 2013
1 parent 951fc5f commit 6f35a65
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/cpufreq/spear-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy,

freqs.new = newfreq / 1000;
freqs.new /= mult;
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);

for_each_cpu(freqs.cpu, policy->cpus)
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);

if (mult == 2)
ret = spear1340_set_cpu_rate(srcclk, newfreq);
Expand All @@ -170,7 +172,8 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy,
freqs.new = clk_get_rate(spear_cpufreq.clk) / 1000;
}

cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
for_each_cpu(freqs.cpu, policy->cpus)
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
return ret;
}

Expand Down

0 comments on commit 6f35a65

Please sign in to comment.