aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/setup.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-02-09 23:47:36 -0500
committerPaul Mackerras <paulus@samba.org>2006-02-10 00:52:03 -0500
commit1965746bce49ddf001af52c7985e16343c768021 (patch)
treed311fce31613545f3430582322d66411566f1863 /arch/powerpc/platforms/pseries/setup.c
parent0941d57aa7034ef7010bd523752c2e3bee569ef1 (diff)
[PATCH] powerpc: Move pSeries firmware feature setup into platforms/pseries
Currently we have some stuff in firmware.h and kernel/firmware.c that is #ifdef CONFIG_PPC_PSERIES. Move it all into platforms/pseries. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r--arch/powerpc/platforms/pseries/setup.c45
1 files changed, 1 insertions, 44 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 984241bb776c..b5996a7060f4 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -60,7 +60,6 @@
60#include <asm/time.h> 60#include <asm/time.h>
61#include <asm/nvram.h> 61#include <asm/nvram.h>
62#include "xics.h" 62#include "xics.h"
63#include <asm/firmware.h>
64#include <asm/pmc.h> 63#include <asm/pmc.h>
65#include <asm/mpic.h> 64#include <asm/mpic.h>
66#include <asm/ppc-pci.h> 65#include <asm/ppc-pci.h>
@@ -70,6 +69,7 @@
70 69
71#include "plpar_wrappers.h" 70#include "plpar_wrappers.h"
72#include "ras.h" 71#include "ras.h"
72#include "firmware.h"
73 73
74#ifdef DEBUG 74#ifdef DEBUG
75#define DBG(fmt...) udbg_printf(fmt) 75#define DBG(fmt...) udbg_printf(fmt)
@@ -262,49 +262,6 @@ static int __init pSeries_init_panel(void)
262} 262}
263arch_initcall(pSeries_init_panel); 263arch_initcall(pSeries_init_panel);
264 264
265
266/* Build up the firmware features bitmask using the contents of
267 * device-tree/ibm,hypertas-functions. Ultimately this functionality may
268 * be moved into prom.c prom_init().
269 */
270static void __init fw_feature_init(void)
271{
272 struct device_node *dn;
273 char *hypertas, *s;
274 int len, i;
275
276 DBG(" -> fw_feature_init()\n");
277
278 dn = of_find_node_by_path("/rtas");
279 if (dn == NULL) {
280 printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n");
281 goto out;
282 }
283
284 hypertas = get_property(dn, "ibm,hypertas-functions", &len);
285 if (hypertas == NULL)
286 goto out;
287
288 for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) {
289 for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) {
290 /* check value against table of strings */
291 if (!firmware_features_table[i].name ||
292 strcmp(firmware_features_table[i].name, s))
293 continue;
294
295 /* we have a match */
296 ppc64_firmware_features |=
297 firmware_features_table[i].val;
298 break;
299 }
300 }
301
302out:
303 of_node_put(dn);
304 DBG(" <- fw_feature_init()\n");
305}
306
307
308static void __init pSeries_discover_pic(void) 265static void __init pSeries_discover_pic(void)
309{ 266{
310 struct device_node *np; 267 struct device_node *np;