diff options
Diffstat (limited to 'drivers/cpufreq/pxa3xx-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/pxa3xx-cpufreq.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index d26306fb00d2..47fbee49d6e5 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c | |||
@@ -108,7 +108,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy, | |||
108 | pxa3xx_freqs_num = num; | 108 | pxa3xx_freqs_num = num; |
109 | pxa3xx_freqs_table = table; | 109 | pxa3xx_freqs_table = table; |
110 | 110 | ||
111 | return cpufreq_frequency_table_cpuinfo(policy, table); | 111 | return cpufreq_table_validate_and_show(policy, table); |
112 | } | 112 | } |
113 | 113 | ||
114 | static void __update_core_freq(struct pxa3xx_freq_info *info) | 114 | static void __update_core_freq(struct pxa3xx_freq_info *info) |
@@ -150,11 +150,6 @@ static void __update_bus_freq(struct pxa3xx_freq_info *info) | |||
150 | cpu_relax(); | 150 | cpu_relax(); |
151 | } | 151 | } |
152 | 152 | ||
153 | static int pxa3xx_cpufreq_verify(struct cpufreq_policy *policy) | ||
154 | { | ||
155 | return cpufreq_frequency_table_verify(policy, pxa3xx_freqs_table); | ||
156 | } | ||
157 | |||
158 | static unsigned int pxa3xx_cpufreq_get(unsigned int cpu) | 153 | static unsigned int pxa3xx_cpufreq_get(unsigned int cpu) |
159 | { | 154 | { |
160 | return pxa3xx_get_clk_frequency_khz(0); | 155 | return pxa3xx_get_clk_frequency_khz(0); |
@@ -206,11 +201,10 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy) | |||
206 | int ret = -EINVAL; | 201 | int ret = -EINVAL; |
207 | 202 | ||
208 | /* set default policy and cpuinfo */ | 203 | /* set default policy and cpuinfo */ |
209 | policy->cpuinfo.min_freq = 104000; | 204 | policy->min = policy->cpuinfo.min_freq = 104000; |
210 | policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000; | 205 | policy->max = policy->cpuinfo.max_freq = |
206 | (cpu_is_pxa320()) ? 806000 : 624000; | ||
211 | policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ | 207 | policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ |
212 | policy->max = pxa3xx_get_clk_frequency_khz(0); | ||
213 | policy->cur = policy->min = policy->max; | ||
214 | 208 | ||
215 | if (cpu_is_pxa300() || cpu_is_pxa310()) | 209 | if (cpu_is_pxa300() || cpu_is_pxa310()) |
216 | ret = setup_freqs_table(policy, pxa300_freqs, | 210 | ret = setup_freqs_table(policy, pxa300_freqs, |
@@ -230,9 +224,10 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy) | |||
230 | } | 224 | } |
231 | 225 | ||
232 | static struct cpufreq_driver pxa3xx_cpufreq_driver = { | 226 | static struct cpufreq_driver pxa3xx_cpufreq_driver = { |
233 | .verify = pxa3xx_cpufreq_verify, | 227 | .verify = cpufreq_generic_frequency_table_verify, |
234 | .target = pxa3xx_cpufreq_set, | 228 | .target = pxa3xx_cpufreq_set, |
235 | .init = pxa3xx_cpufreq_init, | 229 | .init = pxa3xx_cpufreq_init, |
230 | .exit = cpufreq_generic_exit, | ||
236 | .get = pxa3xx_cpufreq_get, | 231 | .get = pxa3xx_cpufreq_get, |
237 | .name = "pxa3xx-cpufreq", | 232 | .name = "pxa3xx-cpufreq", |
238 | }; | 233 | }; |