diff options
author | Michael Neuling <mikey@neuling.org> | 2007-07-18 17:56:32 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-22 07:30:58 -0400 |
commit | ca8ffc974d43033be6e1d4277a45822d2c3656f4 (patch) | |
tree | 6c774a2e500cae66ca30b0b591470cf974d11734 /arch/powerpc/platforms/pseries/firmware.c | |
parent | 4d404edce30f911004850d472e05a31efd751662 (diff) |
[POWERPC] Fix future firmware feature fixups function failure
Move firmware feature initialisation from pSeries_init_early to the
earlier pSeries_probe_hypertas so they are initialised before firmware
feature fixups are applied.
Currently firmware feature sections are only used for iSeries which
initialises the these features much earlier. This is a bug in waiting
on pSeries.
Also adds some whitespace fixups.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/firmware.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/firmware.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c index 29bf83bfb1f0..8b18a1c40092 100644 --- a/arch/powerpc/platforms/pseries/firmware.c +++ b/arch/powerpc/platforms/pseries/firmware.c | |||
@@ -66,24 +66,13 @@ firmware_features_table[FIRMWARE_MAX_FEATURES] = { | |||
66 | * device-tree/ibm,hypertas-functions. Ultimately this functionality may | 66 | * device-tree/ibm,hypertas-functions. Ultimately this functionality may |
67 | * be moved into prom.c prom_init(). | 67 | * be moved into prom.c prom_init(). |
68 | */ | 68 | */ |
69 | void __init fw_feature_init(void) | 69 | void __init fw_feature_init(const char *hypertas, unsigned long len) |
70 | { | 70 | { |
71 | struct device_node *dn; | 71 | const char *s; |
72 | const char *hypertas, *s; | 72 | int i; |
73 | int len, i; | ||
74 | 73 | ||
75 | DBG(" -> fw_feature_init()\n"); | 74 | DBG(" -> fw_feature_init()\n"); |
76 | 75 | ||
77 | dn = of_find_node_by_path("/rtas"); | ||
78 | if (dn == NULL) { | ||
79 | printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n"); | ||
80 | goto out; | ||
81 | } | ||
82 | |||
83 | hypertas = of_get_property(dn, "ibm,hypertas-functions", &len); | ||
84 | if (hypertas == NULL) | ||
85 | goto out; | ||
86 | |||
87 | for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { | 76 | for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { |
88 | for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { | 77 | for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { |
89 | /* check value against table of strings */ | 78 | /* check value against table of strings */ |
@@ -98,7 +87,5 @@ void __init fw_feature_init(void) | |||
98 | } | 87 | } |
99 | } | 88 | } |
100 | 89 | ||
101 | out: | ||
102 | of_node_put(dn); | ||
103 | DBG(" <- fw_feature_init()\n"); | 90 | DBG(" <- fw_feature_init()\n"); |
104 | } | 91 | } |