diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-05-31 00:26:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-31 19:27:11 -0400 |
commit | 5a47d749e3d067e057d276075fed1d91749d3841 (patch) | |
tree | 2a03904cd989d508d994a822ca413592d2e04bd4 /arch/powerpc/platforms | |
parent | 8d16b76421f0b3216012ee2d7819355e1cb847e5 (diff) |
[PATCH] powerpc: Fix boot on eMac
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Prevent calling of some platform functions on the clock chips of the eMac
as it seems to cause it to lockup at boot. For now, add a quirk to prevent
that from happening. Later, I might find out what's wrong and fix it but
that doesn't seem to be important as the machine appear to work fine
without running those. It's possible that Darwin doesn't run them.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Nathan Pilatzke <nathanpilatzke@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powermac/low_i2c.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index df2343e1956b..c896ce83d412 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -1157,6 +1157,7 @@ EXPORT_SYMBOL_GPL(pmac_i2c_xfer); | |||
1157 | /* some quirks for platform function decoding */ | 1157 | /* some quirks for platform function decoding */ |
1158 | enum { | 1158 | enum { |
1159 | pmac_i2c_quirk_invmask = 0x00000001u, | 1159 | pmac_i2c_quirk_invmask = 0x00000001u, |
1160 | pmac_i2c_quirk_skip = 0x00000002u, | ||
1160 | }; | 1161 | }; |
1161 | 1162 | ||
1162 | static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | 1163 | static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, |
@@ -1172,6 +1173,15 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | |||
1172 | /* XXX Study device-tree's & apple drivers are get the quirks | 1173 | /* XXX Study device-tree's & apple drivers are get the quirks |
1173 | * right ! | 1174 | * right ! |
1174 | */ | 1175 | */ |
1176 | /* Workaround: It seems that running the clockspreading | ||
1177 | * properties on the eMac will cause lockups during boot. | ||
1178 | * The machine seems to work fine without that. So for now, | ||
1179 | * let's make sure i2c-hwclock doesn't match about "imic" | ||
1180 | * clocks and we'll figure out if we really need to do | ||
1181 | * something special about those later. | ||
1182 | */ | ||
1183 | { "i2c-hwclock", "imic5002", pmac_i2c_quirk_skip }, | ||
1184 | { "i2c-hwclock", "imic5003", pmac_i2c_quirk_skip }, | ||
1175 | { "i2c-hwclock", NULL, pmac_i2c_quirk_invmask }, | 1185 | { "i2c-hwclock", NULL, pmac_i2c_quirk_invmask }, |
1176 | { "i2c-cpu-voltage", NULL, 0}, | 1186 | { "i2c-cpu-voltage", NULL, 0}, |
1177 | { "temp-monitor", NULL, 0 }, | 1187 | { "temp-monitor", NULL, 0 }, |
@@ -1198,6 +1208,8 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | |||
1198 | if (p->compatible && | 1208 | if (p->compatible && |
1199 | !device_is_compatible(np, p->compatible)) | 1209 | !device_is_compatible(np, p->compatible)) |
1200 | continue; | 1210 | continue; |
1211 | if (p->quirks & pmac_i2c_quirk_skip) | ||
1212 | break; | ||
1201 | callback(np, p->quirks); | 1213 | callback(np, p->quirks); |
1202 | break; | 1214 | break; |
1203 | } | 1215 | } |