aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/prom/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/prom/init.c')
-rw-r--r--arch/sparc64/prom/init.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/sparc64/prom/init.c b/arch/sparc64/prom/init.c
index f3cc2d8578b2..095755e428a6 100644
--- a/arch/sparc64/prom/init.c
+++ b/arch/sparc64/prom/init.c
@@ -18,7 +18,6 @@ enum prom_major_version prom_vers;
18unsigned int prom_rev, prom_prev; 18unsigned int prom_rev, prom_prev;
19 19
20/* The root node of the prom device tree. */ 20/* The root node of the prom device tree. */
21int prom_root_node;
22int prom_stdin, prom_stdout; 21int prom_stdin, prom_stdout;
23int prom_chosen_node; 22int prom_chosen_node;
24 23
@@ -41,26 +40,22 @@ void __init prom_init(void *cif_handler, void *cif_stack)
41 40
42 prom_cif_init(cif_handler, cif_stack); 41 prom_cif_init(cif_handler, cif_stack);
43 42
44 prom_root_node = prom_getsibling(0);
45 if((prom_root_node == 0) || (prom_root_node == -1))
46 prom_halt();
47
48 prom_chosen_node = prom_finddevice(prom_chosen_path); 43 prom_chosen_node = prom_finddevice(prom_chosen_path);
49 if (!prom_chosen_node || prom_chosen_node == -1) 44 if (!prom_chosen_node || prom_chosen_node == -1)
50 prom_halt(); 45 prom_halt();
51 46
52 prom_stdin = prom_getint (prom_chosen_node, "stdin"); 47 prom_stdin = prom_getint(prom_chosen_node, "stdin");
53 prom_stdout = prom_getint (prom_chosen_node, "stdout"); 48 prom_stdout = prom_getint(prom_chosen_node, "stdout");
54 49
55 node = prom_finddevice("/openprom"); 50 node = prom_finddevice("/openprom");
56 if (!node || node == -1) 51 if (!node || node == -1)
57 prom_halt(); 52 prom_halt();
58 53
59 prom_getstring (node, "version", buffer, sizeof (buffer)); 54 prom_getstring(node, "version", buffer, sizeof (buffer));
60 55
61 prom_printf ("\n"); 56 prom_printf("\n");
62 57
63 if (strncmp (buffer, "OBP ", 4)) 58 if (strncmp(buffer, "OBP ", 4))
64 goto strange_version; 59 goto strange_version;
65 60
66 /* 61 /*
@@ -70,7 +65,7 @@ void __init prom_init(void *cif_handler, void *cif_stack)
70 * accordingly. -spot 65 * accordingly. -spot
71 */ 66 */
72 67
73 if (strncmp (buffer, "OBP ", 5)) 68 if (strncmp(buffer, "OBP ", 5))
74 bufadjust = 4; 69 bufadjust = 4;
75 else 70 else
76 bufadjust = 5; 71 bufadjust = 5;
@@ -87,7 +82,8 @@ void __init prom_init(void *cif_handler, void *cif_stack)
87 prom_rev = ints[1]; 82 prom_rev = ints[1];
88 prom_prev = (ints[0] << 16) | (ints[1] << 8) | ints[2]; 83 prom_prev = (ints[0] << 16) | (ints[1] << 8) | ints[2];
89 84
90 printk ("PROMLIB: Sun IEEE Boot Prom %s\n", buffer + bufadjust); 85 printk("PROMLIB: Sun IEEE Boot Prom %s\n", buffer + bufadjust);
86 printk("PROMLIB: Root node compatible: %s\n", prom_root_compatible);
91 87
92 /* Initialization successful. */ 88 /* Initialization successful. */
93 return; 89 return;