From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] ppc32: adapt prom_init to offb change
Date: Fri, 24 Sep 2004 11:04:09 +1000 [thread overview]
Message-ID: <1095987849.3878.29.camel@gaston> (raw)
Hi !
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
===== arch/ppc/syslib/prom_init.c 1.14 vs edited =====
--- 1.14/arch/ppc/syslib/prom_init.c 2004-07-27 04:44:22 +10:00
+++ edited/arch/ppc/syslib/prom_init.c 2004-09-24 10:59:24 +10:00
@@ -115,11 +115,11 @@
ihandle prom_chosen __initdata;
ihandle prom_stdout __initdata;
-char *prom_display_paths[FB_MAX] __initdata;
-phandle prom_display_nodes[FB_MAX] __initdata;
-unsigned int prom_num_displays __initdata;
-char *of_stdout_device __initdata;
+static char *prom_display_paths[FB_MAX] __initdata;
+static phandle prom_display_nodes[FB_MAX] __initdata;
+static unsigned int prom_num_displays __initdata;
static ihandle prom_disp_node __initdata;
+char *of_stdout_device __initdata;
unsigned int rtas_data; /* physical pointer */
unsigned int rtas_entry; /* physical pointer */
@@ -403,6 +403,7 @@
for (j=0; j<prom_num_displays; j++) {
path = prom_display_paths[j];
+ node = prom_display_nodes[j];
prom_print("opening display ");
prom_print(path);
ih = call_prom("open", 1, 1, path);
@@ -420,6 +421,8 @@
continue;
} else {
prom_print("... ok\n");
+ call_prom("setprop", 4, 1, node, "linux,opened", 0, NULL);
+
/*
* Setup a usable color table when the appropriate
* method is available.
@@ -439,6 +442,19 @@
clut[1], clut[2]) != 0)
break;
#endif /* CONFIG_LOGO_LINUX_CLUT224 */
+ }
+ }
+
+ 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);
}
}
reply other threads:[~2004-09-24 1:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1095987849.3878.29.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®