aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v32/mach-fs/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v32/mach-fs/cpufreq.c')
-rw-r--r--arch/cris/arch-v32/mach-fs/cpufreq.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/cris/arch-v32/mach-fs/cpufreq.c b/arch/cris/arch-v32/mach-fs/cpufreq.c
index d92cf70d1cbe..12952235d5db 100644
--- a/arch/cris/arch-v32/mach-fs/cpufreq.c
+++ b/arch/cris/arch-v32/mach-fs/cpufreq.c
@@ -27,20 +27,17 @@ static unsigned int cris_freq_get_cpu_frequency(unsigned int cpu)
27 return clk_ctrl.pll ? 200000 : 6000; 27 return clk_ctrl.pll ? 200000 : 6000;
28} 28}
29 29
30static void cris_freq_set_cpu_state(unsigned int state) 30static void cris_freq_set_cpu_state(struct cpufreq_policy *policy,
31 unsigned int state)
31{ 32{
32 int i;
33 struct cpufreq_freqs freqs; 33 struct cpufreq_freqs freqs;
34 reg_config_rw_clk_ctrl clk_ctrl; 34 reg_config_rw_clk_ctrl clk_ctrl;
35 clk_ctrl = REG_RD(config, regi_config, rw_clk_ctrl); 35 clk_ctrl = REG_RD(config, regi_config, rw_clk_ctrl);
36 36
37 for_each_possible_cpu(i) { 37 freqs.old = cris_freq_get_cpu_frequency(policy->cpu);
38 freqs.old = cris_freq_get_cpu_frequency(i); 38 freqs.new = cris_freq_table[state].frequency;
39 freqs.new = cris_freq_table[state].frequency;
40 freqs.cpu = i;
41 }
42 39
43 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 40 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
44 41
45 local_irq_disable(); 42 local_irq_disable();
46 43
@@ -54,7 +51,7 @@ static void cris_freq_set_cpu_state(unsigned int state)
54 51
55 local_irq_enable(); 52 local_irq_enable();
56 53
57 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 54 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
58}; 55};
59 56
60static int cris_freq_verify(struct cpufreq_policy *policy) 57static int cris_freq_verify(struct cpufreq_policy *policy)
@@ -71,7 +68,7 @@ static int cris_freq_target(struct cpufreq_policy *policy,
71 (policy, cris_freq_table, target_freq, relation, &newstate)) 68 (policy, cris_freq_table, target_freq, relation, &newstate))
72 return -EINVAL; 69 return -EINVAL;
73 70
74 cris_freq_set_cpu_state(newstate); 71 cris_freq_set_cpu_state(policy, newstate);
75 72
76 return 0; 73 return 0;
77} 74}