summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/prom
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/prom')
-rw-r--r--arch/sparc64/prom/init.c20
-rw-r--r--arch/sparc64/prom/tree.c9
2 files changed, 14 insertions, 15 deletions
diff --git a/arch/sparc64/prom/init.c b/arch/sparc64/prom/init.c
index f3cc2d8578b..095755e428a 100644
--- a/arch/sparc64/prom/init.c
+++ b/arch/sparc64/prom/init.c
@@ -18,7 +18,6 @@ enum prom_major_version prom_vers;
unsigned int prom_rev, prom_prev;
/* The root node of the prom device tree. */
-int prom_root_node;
int prom_stdin, prom_stdout;
int prom_chosen_node;
@@ -41,26 +40,22 @@ void __init prom_init(void *cif_handler, void *cif_stack)
prom_cif_init(cif_handler, cif_stack);
- prom_root_node = prom_getsibling(0);
- if((prom_root_node == 0) || (prom_root_node == -1))
- prom_halt();
-
prom_chosen_node = prom_finddevice(prom_chosen_path);
if (!prom_chosen_node || prom_chosen_node == -1)
prom_halt();
- prom_stdin = prom_getint (prom_chosen_node, "stdin");
- prom_stdout = prom_getint (prom_chosen_node, "stdout");
+ prom_stdin = prom_getint(prom_chosen_node, "stdin");
+ prom_stdout = prom_getint(prom_chosen_node, "stdout");
node = prom_finddevice("/openprom");
if (!node || node == -1)
prom_halt();
- prom_getstring (node, "version", buffer, sizeof (buffer));
+ prom_getstring(node, "version", buffer, sizeof (buffer));
- prom_printf ("\n");
+ prom_printf("\n");
- if (strncmp (buffer, "OBP ", 4))
+ if (strncmp(buffer, "OBP ", 4))
goto strange_version;
/*
@@ -70,7 +65,7 @@ void __init prom_init(void *cif_handler, void *cif_stack)
* accordingly. -spot
*/
- if (strncmp (buffer, "OBP ", 5))
+ if (strncmp(buffer, "OBP ", 5))
bufadjust = 4;
else
bufadjust = 5;
@@ -87,7 +82,8 @@ void __init prom_init(void *cif_handler, void *cif_stack)
prom_rev = ints[1];
prom_prev = (ints[0] << 16) | (ints[1] << 8) | ints[2];
- printk ("PROMLIB: Sun IEEE Boot Prom %s\n", buffer + bufadjust);
+ printk("PROMLIB: Sun IEEE Boot Prom %s\n", buffer + bufadjust);
+ printk("PROMLIB: Root node compatible: %s\n", prom_root_compatible);
/* Initialization successful. */
return;
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c
index b1ff9e87dcc..49075abd7cb 100644
--- a/arch/sparc64/prom/tree.c
+++ b/arch/sparc64/prom/tree.c
@@ -51,7 +51,7 @@ prom_getparent(int node)
__inline__ int
__prom_getsibling(int node)
{
- return p1275_cmd ("peer", P1275_INOUT(1, 1), node);
+ return p1275_cmd(prom_peer_name, P1275_INOUT(1, 1), node);
}
__inline__ int
@@ -59,9 +59,12 @@ prom_getsibling(int node)
{
int sibnode;
- if(node == -1) return 0;
+ if (node == -1)
+ return 0;
sibnode = __prom_getsibling(node);
- if(sibnode == -1) return 0;
+ if (sibnode == -1)
+ return 0;
+
return sibnode;
}