aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/windfarm_cpufreq_clamp.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-03-03 01:03:21 -0500
committerPaul Mackerras <paulus@samba.org>2006-03-03 05:43:53 -0500
commitb55fafc5a800f27beedfdcf8bd1b6baa47e769a9 (patch)
treedc651c5738f20b72cb17ef3fc33e2e27977e6372 /drivers/macintosh/windfarm_cpufreq_clamp.c
parent0c2aca88bdac4254a13466fb108733d243a118b6 (diff)
[PATCH] powerpc: Fix old g5 issues with windfarm
Some of the windfarm sensor modules can initialize on old machines that don't have full windfarm support like non-dual core desktop G5s. Unfortunately, by doing so, they would trigger a bug in their matching algorithm causing them to attach to the wrong bus, thus triggering issues with the i2c core and breaking the thermal driver. This patch fixes the probing issue (so that they will work when a windfarm port is done to these machines) and also prevents for now windfarm to load at all on these machines that still use therm_pm72 to avoid wasting resources. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/windfarm_cpufreq_clamp.c')
-rw-r--r--drivers/macintosh/windfarm_cpufreq_clamp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/macintosh/windfarm_cpufreq_clamp.c b/drivers/macintosh/windfarm_cpufreq_clamp.c
index 607dbaca69c9..81337cd16e80 100644
--- a/drivers/macintosh/windfarm_cpufreq_clamp.c
+++ b/drivers/macintosh/windfarm_cpufreq_clamp.c
@@ -8,6 +8,8 @@
8#include <linux/wait.h> 8#include <linux/wait.h>
9#include <linux/cpufreq.h> 9#include <linux/cpufreq.h>
10 10
11#include <asm/prom.h>
12
11#include "windfarm.h" 13#include "windfarm.h"
12 14
13#define VERSION "0.3" 15#define VERSION "0.3"
@@ -74,6 +76,12 @@ static int __init wf_cpufreq_clamp_init(void)
74{ 76{
75 struct wf_control *clamp; 77 struct wf_control *clamp;
76 78
79 /* Don't register on old machines that use therm_pm72 for now */
80 if (machine_is_compatible("PowerMac7,2") ||
81 machine_is_compatible("PowerMac7,3") ||
82 machine_is_compatible("RackMac3,1"))
83 return -ENODEV;
84
77 clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL); 85 clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL);
78 if (clamp == NULL) 86 if (clamp == NULL)
79 return -ENOMEM; 87 return -ENOMEM;