[Patch]: fix cpufrequency scaling on ppc

From: Guido Guenther
Date: Tue Sep 28 2004 - 07:43:17 EST


Hi,
attached patch against 2.6.9-rc2 fixes cpufrequency scaling after resume
on pmacs. Please apply.
-- Guido

Signed-off-by: Guido Guenther <agx@xxxxxxxxxxx>


--- linux-2.6.9-rc2.orig/arch/ppc/platforms/pmac_cpufreq.c 2004-09-15 09:22:54.000000000 +0200
+++ linux-2.6.9-rc2/arch/ppc/platforms/pmac_cpufreq.c 2004-09-28 14:36:20.265785384 +0200
@@ -366,12 +367,26 @@
return 0x50 + (*reg);
}

+static unsigned int __pmac pmac_cpufreq_get(unsigned int cpu)
+{
+ if (cpu)
+ return -ENODEV;
+ return cur_freq;
+}
+
+static struct freq_attr* pmac_cpufreq_attr[] = {
+ &cpufreq_freq_attr_scaling_available_freqs,
+ NULL,
+};
+
static struct cpufreq_driver pmac_cpufreq_driver = {
.verify = pmac_cpufreq_verify,
.target = pmac_cpufreq_target,
.init = pmac_cpufreq_cpu_init,
+ .get = pmac_cpufreq_get,
.name = "powermac",
.owner = THIS_MODULE,
+ .attr = pmac_cpufreq_attr,
};


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/