[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>
This commit is contained in:
Michael Ellerman
2006-02-10 15:47:36 +11:00
committed by Paul Mackerras
parent 0941d57aa7
commit 1965746bce
6 changed files with 123 additions and 79 deletions

View File

@@ -60,7 +60,6 @@
#include <asm/time.h>
#include <asm/nvram.h>
#include "xics.h"
#include <asm/firmware.h>
#include <asm/pmc.h>
#include <asm/mpic.h>
#include <asm/ppc-pci.h>
@@ -70,6 +69,7 @@
#include "plpar_wrappers.h"
#include "ras.h"
#include "firmware.h"
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
@@ -262,49 +262,6 @@ static int __init pSeries_init_panel(void)
}
arch_initcall(pSeries_init_panel);
/* Build up the firmware features bitmask using the contents of
* device-tree/ibm,hypertas-functions. Ultimately this functionality may
* be moved into prom.c prom_init().
*/
static void __init fw_feature_init(void)
{
struct device_node *dn;
char *hypertas, *s;
int len, i;
DBG(" -> fw_feature_init()\n");
dn = of_find_node_by_path("/rtas");
if (dn == NULL) {
printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n");
goto out;
}
hypertas = get_property(dn, "ibm,hypertas-functions", &len);
if (hypertas == NULL)
goto out;
for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) {
for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) {
/* check value against table of strings */
if (!firmware_features_table[i].name ||
strcmp(firmware_features_table[i].name, s))
continue;
/* we have a match */
ppc64_firmware_features |=
firmware_features_table[i].val;
break;
}
}
out:
of_node_put(dn);
DBG(" <- fw_feature_init()\n");
}
static void __init pSeries_discover_pic(void)
{
struct device_node *np;