aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/s3c64xx-cpufreq.c
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 /drivers/cpufreq/s3c64xx-cpufreq.c
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 'drivers/cpufreq/s3c64xx-cpufreq.c')
-rw-r--r--drivers/cpufreq/s3c64xx-cpufreq.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c
index 6f9490b3c356..27cacb524796 100644
--- a/drivers/cpufreq/s3c64xx-cpufreq.c
+++ b/drivers/cpufreq/s3c64xx-cpufreq.c
@@ -84,7 +84,6 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
84 if (ret != 0) 84 if (ret != 0)
85 return ret; 85 return ret;
86 86
87 freqs.cpu = 0;
88 freqs.old = clk_get_rate(armclk) / 1000; 87 freqs.old = clk_get_rate(armclk) / 1000;
89 freqs.new = s3c64xx_freq_table[i].frequency; 88 freqs.new = s3c64xx_freq_table[i].frequency;
90 freqs.flags = 0; 89 freqs.flags = 0;
@@ -95,7 +94,7 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
95 94
96 pr_debug("Transition %d-%dkHz\n", freqs.old, freqs.new); 95 pr_debug("Transition %d-%dkHz\n", freqs.old, freqs.new);
97 96
98 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 97 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
99 98
100#ifdef CONFIG_REGULATOR 99#ifdef CONFIG_REGULATOR
101 if (vddarm && freqs.new > freqs.old) { 100 if (vddarm && freqs.new > freqs.old) {
@@ -117,7 +116,7 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
117 goto err; 116 goto err;
118 } 117 }
119 118
120 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 119 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
121 120
122#ifdef CONFIG_REGULATOR 121#ifdef CONFIG_REGULATOR
123 if (vddarm && freqs.new < freqs.old) { 122 if (vddarm && freqs.new < freqs.old) {
@@ -141,7 +140,7 @@ err_clk:
141 if (clk_set_rate(armclk, freqs.old * 1000) < 0) 140 if (clk_set_rate(armclk, freqs.old * 1000) < 0)
142 pr_err("Failed to restore original clock rate\n"); 141 pr_err("Failed to restore original clock rate\n");
143err: 142err:
144 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 143 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
145 144
146 return ret; 145 return ret;
147} 146}