summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/pmac32-cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/pmac32-cpufreq.c')
-rw-r--r--drivers/cpufreq/pmac32-cpufreq.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index a096cd3fa23d..6eac1e230078 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -86,11 +86,6 @@ static struct cpufreq_frequency_table pmac_cpu_freqs[] = {
86 {0, CPUFREQ_TABLE_END}, 86 {0, CPUFREQ_TABLE_END},
87}; 87};
88 88
89static struct freq_attr* pmac_cpu_freqs_attr[] = {
90 &cpufreq_freq_attr_scaling_available_freqs,
91 NULL,
92};
93
94static inline void local_delay(unsigned long ms) 89static inline void local_delay(unsigned long ms)
95{ 90{
96 if (no_schedule) 91 if (no_schedule)
@@ -378,11 +373,6 @@ static unsigned int pmac_cpufreq_get_speed(unsigned int cpu)
378 return cur_freq; 373 return cur_freq;
379} 374}
380 375
381static int pmac_cpufreq_verify(struct cpufreq_policy *policy)
382{
383 return cpufreq_frequency_table_verify(policy, pmac_cpu_freqs);
384}
385
386static int pmac_cpufreq_target( struct cpufreq_policy *policy, 376static int pmac_cpufreq_target( struct cpufreq_policy *policy,
387 unsigned int target_freq, 377 unsigned int target_freq,
388 unsigned int relation) 378 unsigned int relation)
@@ -402,14 +392,7 @@ static int pmac_cpufreq_target( struct cpufreq_policy *policy,
402 392
403static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) 393static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
404{ 394{
405 if (policy->cpu != 0) 395 return cpufreq_generic_init(policy, pmac_cpu_freqs, transition_latency);
406 return -ENODEV;
407
408 policy->cpuinfo.transition_latency = transition_latency;
409 policy->cur = cur_freq;
410
411 cpufreq_frequency_table_get_attr(pmac_cpu_freqs, policy->cpu);
412 return cpufreq_frequency_table_cpuinfo(policy, pmac_cpu_freqs);
413} 396}
414 397
415static u32 read_gpio(struct device_node *np) 398static u32 read_gpio(struct device_node *np)
@@ -469,14 +452,14 @@ static int pmac_cpufreq_resume(struct cpufreq_policy *policy)
469} 452}
470 453
471static struct cpufreq_driver pmac_cpufreq_driver = { 454static struct cpufreq_driver pmac_cpufreq_driver = {
472 .verify = pmac_cpufreq_verify, 455 .verify = cpufreq_generic_frequency_table_verify,
473 .target = pmac_cpufreq_target, 456 .target = pmac_cpufreq_target,
474 .get = pmac_cpufreq_get_speed, 457 .get = pmac_cpufreq_get_speed,
475 .init = pmac_cpufreq_cpu_init, 458 .init = pmac_cpufreq_cpu_init,
476 .suspend = pmac_cpufreq_suspend, 459 .suspend = pmac_cpufreq_suspend,
477 .resume = pmac_cpufreq_resume, 460 .resume = pmac_cpufreq_resume,
478 .flags = CPUFREQ_PM_NO_WARN, 461 .flags = CPUFREQ_PM_NO_WARN,
479 .attr = pmac_cpu_freqs_attr, 462 .attr = cpufreq_generic_attr,
480 .name = "powermac", 463 .name = "powermac",
481}; 464};
482 465