diff options
author | Marc Zyngier <maz@misterjones.org> | 2010-12-05 00:05:37 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-12-08 23:36:30 -0500 |
commit | 98b14d6b290d96b24ae993ceaccc59b2aa4b130c (patch) | |
tree | cbf1655199e699411b0ca0e1b92b551cf37abf28 /arch/powerpc | |
parent | 982cf00412a890ca738c2d78528b652ca431ad1a (diff) |
powerpc/powermac: Make auto-loading of therm_pm72 possible
The therm_pm72 driver, used on the PowerMac G5 range, cannot be
auto-loaded, since the driver itself creates both the device node
and the driver instance.
Moving the device node creation to the platform setup code and
adding the necessary MODULE_DEVICE_TABLE() information allows the
driver to be automatically loaded by udev on any semi-modern
distribution.
It "fixes" a major source of problem on G5 machines where the
driver wasn't explicitely loaded by default, and the system
would automatically shutdown under load.
Tested on an Xserve G5.
Signed-off-by: Marc Zyngier <maz@misterjones.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/powermac/setup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 9deb274841f1..d5aceb7fb125 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -506,6 +506,15 @@ static int __init pmac_declare_of_platform_devices(void) | |||
506 | of_platform_device_create(np, "smu", NULL); | 506 | of_platform_device_create(np, "smu", NULL); |
507 | of_node_put(np); | 507 | of_node_put(np); |
508 | } | 508 | } |
509 | np = of_find_node_by_type(NULL, "fcu"); | ||
510 | if (np == NULL) { | ||
511 | /* Some machines have strangely broken device-tree */ | ||
512 | np = of_find_node_by_path("/u3@0,f8000000/i2c@f8001000/fan@15e"); | ||
513 | } | ||
514 | if (np) { | ||
515 | of_platform_device_create(np, "temperature", NULL); | ||
516 | of_node_put(np); | ||
517 | } | ||
509 | 518 | ||
510 | return 0; | 519 | return 0; |
511 | } | 520 | } |