aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/pxa2xx-cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/pxa2xx-cpufreq.c')
-rw-r--r--drivers/cpufreq/pxa2xx-cpufreq.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c
index 29aca574317b..183bc13f13e5 100644
--- a/drivers/cpufreq/pxa2xx-cpufreq.c
+++ b/drivers/cpufreq/pxa2xx-cpufreq.c
@@ -267,14 +267,11 @@ static unsigned int pxa_cpufreq_get(unsigned int cpu)
267 return get_clk_frequency_khz(0); 267 return get_clk_frequency_khz(0);
268} 268}
269 269
270static int pxa_set_target(struct cpufreq_policy *policy, 270static int pxa_set_target(struct cpufreq_policy *policy, unsigned int idx)
271 unsigned int target_freq,
272 unsigned int relation)
273{ 271{
274 struct cpufreq_frequency_table *pxa_freqs_table; 272 struct cpufreq_frequency_table *pxa_freqs_table;
275 pxa_freqs_t *pxa_freq_settings; 273 pxa_freqs_t *pxa_freq_settings;
276 struct cpufreq_freqs freqs; 274 struct cpufreq_freqs freqs;
277 unsigned int idx;
278 unsigned long flags; 275 unsigned long flags;
279 unsigned int new_freq_cpu, new_freq_mem; 276 unsigned int new_freq_cpu, new_freq_mem;
280 unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg; 277 unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg;
@@ -283,12 +280,6 @@ static int pxa_set_target(struct cpufreq_policy *policy,
283 /* Get the current policy */ 280 /* Get the current policy */
284 find_freq_tables(&pxa_freqs_table, &pxa_freq_settings); 281 find_freq_tables(&pxa_freqs_table, &pxa_freq_settings);
285 282
286 /* Lookup the next frequency */
287 if (cpufreq_frequency_table_target(policy, pxa_freqs_table,
288 target_freq, relation, &idx)) {
289 return -EINVAL;
290 }
291
292 new_freq_cpu = pxa_freq_settings[idx].khz; 283 new_freq_cpu = pxa_freq_settings[idx].khz;
293 new_freq_mem = pxa_freq_settings[idx].membus; 284 new_freq_mem = pxa_freq_settings[idx].membus;
294 freqs.old = policy->cur; 285 freqs.old = policy->cur;
@@ -448,7 +439,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy)
448 439
449static struct cpufreq_driver pxa_cpufreq_driver = { 440static struct cpufreq_driver pxa_cpufreq_driver = {
450 .verify = cpufreq_generic_frequency_table_verify, 441 .verify = cpufreq_generic_frequency_table_verify,
451 .target = pxa_set_target, 442 .target_index = pxa_set_target,
452 .init = pxa_cpufreq_init, 443 .init = pxa_cpufreq_init,
453 .exit = cpufreq_generic_exit, 444 .exit = cpufreq_generic_exit,
454 .get = pxa_cpufreq_get, 445 .get = pxa_cpufreq_get,