vserver 1.9.3
[linux-2.6.git] / arch / ppc / platforms / pmac_cpufreq.c
index 5b2221a..b51b37d 100644 (file)
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/i2c.h>
+#include <linux/hardirq.h>
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/irq.h>
-#include <asm/hardirq.h>
 #include <asm/pmac_feature.h>
 #include <asm/mmu_context.h>
 #include <asm/sections.h>
@@ -301,7 +301,6 @@ static int __pmac pmu_set_cpu_speed(int low_speed)
 static int __pmac do_set_cpu_speed(int speed_mode)
 {
        struct cpufreq_freqs freqs;
-       int rc;
 
        freqs.old = cur_freq;
        freqs.new = (speed_mode == PMAC_CPU_HIGH_SPEED) ? hi_freq : low_freq;
@@ -315,7 +314,7 @@ static int __pmac do_set_cpu_speed(int speed_mode)
        cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
        cur_freq = (speed_mode == PMAC_CPU_HIGH_SPEED) ? hi_freq : low_freq;
 
-       return rc;
+       return 0;
 }
 
 static int __pmac pmac_cpufreq_verify(struct cpufreq_policy *policy)
@@ -498,7 +497,7 @@ static int __pmac pmac_cpufreq_init_7447A(struct device_node *cpunode)
  *  - Titanium PowerBook 800 (PMU based, 667Mhz & 800Mhz)
  *  - Titanium PowerBook 400 (PMU based, 300Mhz & 400Mhz)
  *  - Titanium PowerBook 500 (PMU based, 300Mhz & 500Mhz)
- *  - iBook2 500 (PMU based, 400Mhz & 500Mhz)
+ *  - iBook2 500/600 (PMU based, 400Mhz & 500/600Mhz)
  *  - iBook2 700 (CPU based, 400Mhz & 700Mhz, support low voltage)
  *  - Recent MacRISC3 laptops
  *  - iBook G4s and PowerBook G4s with 7447A CPUs
@@ -533,11 +532,8 @@ static int __init pmac_cpufreq_setup(void)
                   machine_is_compatible("PowerBook3,5") ||
                   machine_is_compatible("MacRISC3")) {
                pmac_cpufreq_init_MacRISC3(cpunode);
-       /* Else check for iBook2 500 */
+       /* Else check for iBook2 500/600 */
        } else if (machine_is_compatible("PowerBook4,1")) {
-               /* We only know about 500Mhz model */
-               if (cur_freq < 450000 || cur_freq > 550000)
-                       goto out;
                hi_freq = cur_freq;
                low_freq = 400000;
                set_speed_proc = pmu_set_cpu_speed;