Skip to content

Commit

Permalink
cpufreq: ARM big LITTLE: Adapt to latest cpufreq updates
Browse files Browse the repository at this point in the history
This driver isn't updated to work with latest cpufreq core updates that happened
recently. Fix them.

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 Apr 21, 2013
1 parent 763f8c3 commit ad61f44
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/cpufreq/arm_big_little.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,14 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy,
target_freq, relation, &freq_tab_idx);
freqs.new = freq_table[cur_cluster][freq_tab_idx].frequency;

freqs.cpu = policy->cpu;

pr_debug("%s: cpu: %d, cluster: %d, oldfreq: %d, target freq: %d, new freq: %d\n",
__func__, cpu, cur_cluster, freqs.old, target_freq,
freqs.new);

if (freqs.old == freqs.new)
return 0;

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

ret = clk_set_rate(clk[cur_cluster], freqs.new * 1000);
if (ret) {
Expand All @@ -97,8 +94,7 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy,

policy->cur = freqs.new;

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

return ret;
}
Expand Down Expand Up @@ -231,7 +227,7 @@ static struct cpufreq_driver bL_cpufreq_driver = {
.get = bL_cpufreq_get,
.init = bL_cpufreq_init,
.exit = bL_cpufreq_exit,
.have_multiple_policies = true,
.have_governor_per_policy = true,
.attr = bL_cpufreq_attr,
};

Expand Down

0 comments on commit ad61f44

Please sign in to comment.