aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-03-24 02:26:43 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-02 09:24:00 -0400
commitb43a7ffbf33be7e4d3b10b7714ee663ea2c52fe2 (patch)
tree7d3ac2733d76a785be12bfba75bfe244a5a31460 /arch/arm/mach-davinci
parentfd143b4d6fb763183ef6e46d1ab84a42c59079af (diff)
cpufreq: Notify all policy->cpus in cpufreq_notify_transition()
policy->cpus contains all online cpus that have single shared clock line. And their frequencies are always updated together. Many SMP system's cpufreq drivers take care of this in individual drivers but the best place for this code is in cpufreq core. This patch modifies cpufreq_notify_transition() to notify frequency change for all cpus in policy->cpus and hence updates all users of this API. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/cpufreq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c
index 4729eaab0f40..55eb8703043d 100644
--- a/arch/arm/mach-davinci/cpufreq.c
+++ b/arch/arm/mach-davinci/cpufreq.c
@@ -90,7 +90,6 @@ static int davinci_target(struct cpufreq_policy *policy,
90 90
91 freqs.old = davinci_getspeed(0); 91 freqs.old = davinci_getspeed(0);
92 freqs.new = clk_round_rate(armclk, target_freq * 1000) / 1000; 92 freqs.new = clk_round_rate(armclk, target_freq * 1000) / 1000;
93 freqs.cpu = 0;
94 93
95 if (freqs.old == freqs.new) 94 if (freqs.old == freqs.new)
96 return ret; 95 return ret;
@@ -102,7 +101,7 @@ static int davinci_target(struct cpufreq_policy *policy,
102 if (ret) 101 if (ret)
103 return -EINVAL; 102 return -EINVAL;
104 103
105 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 104 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
106 105
107 /* if moving to higher frequency, up the voltage beforehand */ 106 /* if moving to higher frequency, up the voltage beforehand */
108 if (pdata->set_voltage && freqs.new > freqs.old) { 107 if (pdata->set_voltage && freqs.new > freqs.old) {
@@ -126,7 +125,7 @@ static int davinci_target(struct cpufreq_policy *policy,
126 pdata->set_voltage(idx); 125 pdata->set_voltage(idx);
127 126
128out: 127out:
129 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 128 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
130 129
131 return ret; 130 return ret;
132} 131}