Commit 0775cc5c authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

[PATCH] ppc32: adapt prom_init to offb change

The changes to prom_init/offb interaction introduced by the ppc64
monster cleanup patch need a fix to ppc32 prom_init so that offb
works again. ppc32 prom_init() could use a lot more cleanup, but
let's do the minimal fix to make it work now.
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3543616d
...@@ -115,11 +115,11 @@ prom_entry prom __initdata; ...@@ -115,11 +115,11 @@ prom_entry prom __initdata;
ihandle prom_chosen __initdata; ihandle prom_chosen __initdata;
ihandle prom_stdout __initdata; ihandle prom_stdout __initdata;
char *prom_display_paths[FB_MAX] __initdata; static char *prom_display_paths[FB_MAX] __initdata;
phandle prom_display_nodes[FB_MAX] __initdata; static phandle prom_display_nodes[FB_MAX] __initdata;
unsigned int prom_num_displays __initdata; static unsigned int prom_num_displays __initdata;
char *of_stdout_device __initdata;
static ihandle prom_disp_node __initdata; static ihandle prom_disp_node __initdata;
char *of_stdout_device __initdata;
unsigned int rtas_data; /* physical pointer */ unsigned int rtas_data; /* physical pointer */
unsigned int rtas_entry; /* physical pointer */ unsigned int rtas_entry; /* physical pointer */
...@@ -403,6 +403,7 @@ check_display(unsigned long mem) ...@@ -403,6 +403,7 @@ check_display(unsigned long mem)
for (j=0; j<prom_num_displays; j++) { for (j=0; j<prom_num_displays; j++) {
path = prom_display_paths[j]; path = prom_display_paths[j];
node = prom_display_nodes[j];
prom_print("opening display "); prom_print("opening display ");
prom_print(path); prom_print(path);
ih = call_prom("open", 1, 1, path); ih = call_prom("open", 1, 1, path);
...@@ -420,6 +421,8 @@ check_display(unsigned long mem) ...@@ -420,6 +421,8 @@ check_display(unsigned long mem)
continue; continue;
} else { } else {
prom_print("... ok\n"); prom_print("... ok\n");
call_prom("setprop", 4, 1, node, "linux,opened", 0, NULL);
/* /*
* Setup a usable color table when the appropriate * Setup a usable color table when the appropriate
* method is available. * method is available.
...@@ -442,6 +445,19 @@ check_display(unsigned long mem) ...@@ -442,6 +445,19 @@ check_display(unsigned long mem)
} }
} }
if (prom_stdout) {
phandle p;
p = call_prom("instance-to-package", 1, 1, prom_stdout);
if (p && (int)p != -1) {
type[0] = 0;
call_prom("getprop", 4, 1, p, "device_type",
type, sizeof(type));
if (strcmp(type, "display") == 0)
call_prom("setprop", 4, 1, p, "linux,boot-display",
0, NULL);
}
}
return ALIGNUL(mem); return ALIGNUL(mem);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment