mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
[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>
This commit is contained in:
parent
8d16b76421
commit
5a47d749e3
1 changed files with 12 additions and 0 deletions
|
@ -1157,6 +1157,7 @@ EXPORT_SYMBOL_GPL(pmac_i2c_xfer);
|
|||
/* some quirks for platform function decoding */
|
||||
enum {
|
||||
pmac_i2c_quirk_invmask = 0x00000001u,
|
||||
pmac_i2c_quirk_skip = 0x00000002u,
|
||||
};
|
||||
|
||||
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,
|
|||
/* XXX Study device-tree's & apple drivers are get the quirks
|
||||
* right !
|
||||
*/
|
||||
/* Workaround: It seems that running the clockspreading
|
||||
* properties on the eMac will cause lockups during boot.
|
||||
* The machine seems to work fine without that. So for now,
|
||||
* let's make sure i2c-hwclock doesn't match about "imic"
|
||||
* clocks and we'll figure out if we really need to do
|
||||
* something special about those later.
|
||||
*/
|
||||
{ "i2c-hwclock", "imic5002", pmac_i2c_quirk_skip },
|
||||
{ "i2c-hwclock", "imic5003", pmac_i2c_quirk_skip },
|
||||
{ "i2c-hwclock", NULL, pmac_i2c_quirk_invmask },
|
||||
{ "i2c-cpu-voltage", NULL, 0},
|
||||
{ "temp-monitor", NULL, 0 },
|
||||
|
@ -1198,6 +1208,8 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev,
|
|||
if (p->compatible &&
|
||||
!device_is_compatible(np, p->compatible))
|
||||
continue;
|
||||
if (p->quirks & pmac_i2c_quirk_skip)
|
||||
break;
|
||||
callback(np, p->quirks);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue