diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-01-30 23:53:56 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-01 18:01:16 -0500 |
commit | 6f35a65fbb570086428596d907df6300abffd948 (patch) | |
tree | c9b3014a5d19361c2092918e243f3fd48ad9627c /drivers/cpufreq | |
parent | 951fc5f45836988c7df1d05c7f4658f331e7a920 (diff) |
cpufreq: SPEAr: Notify all policy->cpus of frequency change
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>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/spear-cpufreq.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c index fc714a65fa15..a0265353cb45 100644 --- a/drivers/cpufreq/spear-cpufreq.c +++ b/drivers/cpufreq/spear-cpufreq.c | |||
@@ -157,7 +157,9 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy, | |||
157 | 157 | ||
158 | freqs.new = newfreq / 1000; | 158 | freqs.new = newfreq / 1000; |
159 | freqs.new /= mult; | 159 | freqs.new /= mult; |
160 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 160 | |
161 | for_each_cpu(freqs.cpu, policy->cpus) | ||
162 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | ||
161 | 163 | ||
162 | if (mult == 2) | 164 | if (mult == 2) |
163 | ret = spear1340_set_cpu_rate(srcclk, newfreq); | 165 | ret = spear1340_set_cpu_rate(srcclk, newfreq); |
@@ -170,7 +172,8 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy, | |||
170 | freqs.new = clk_get_rate(spear_cpufreq.clk) / 1000; | 172 | freqs.new = clk_get_rate(spear_cpufreq.clk) / 1000; |
171 | } | 173 | } |
172 | 174 | ||
173 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 175 | for_each_cpu(freqs.cpu, policy->cpus) |
176 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
174 | return ret; | 177 | return ret; |
175 | } | 178 | } |
176 | 179 | ||