From: Valentine Barshak <vbarshak@ru•mvista.com>
To: linuxppc-dev@ozlabs•org
Cc: arnd@arndb•de
Subject: [PATCH] PowerPC: Add legacy serial support for OPB with flattened device tree.
Date: Thu, 11 Oct 2007 23:09:25 +0400 [thread overview]
Message-ID: <20071011190925.GA22704@ru.mvista.com> (raw)
In-Reply-To: <200710111909.39927.arnd@arndb.de>
Currently find_legacy_serial_ports() can find no serial ports on the OPB
with flattened device. Thus no legacy boot console can be initialized.
Just the early udbg console works, which is initialized with udbg_init_44x_as1
on the UART's physical address specified in kernel config. This happens
because we look for ns16750 serial devices only and expect opb node to have
a device type property. This patch makes it look for ns16550-compatible
devices and use of_device_is_compatible() for opb in case device type is not
specified.
Signed-off-by: Valentine Barshak <vbarshak@ru•mvista.com>
---
arch/powerpc/kernel/legacy_serial.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff -pruN linux-2.6.orig/arch/powerpc/kernel/legacy_serial.c linux-2.6/arch/powerpc/kernel/legacy_serial.c
--- linux-2.6.orig/arch/powerpc/kernel/legacy_serial.c 2007-10-11 17:12:09.000000000 +0400
+++ linux-2.6/arch/powerpc/kernel/legacy_serial.c 2007-10-11 23:01:25.000000000 +0400
@@ -340,9 +340,10 @@ void __init find_legacy_serial_ports(voi
}
/* First fill our array with opb bus ports */
- for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16750")) != NULL;) {
+ for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
struct device_node *opb = of_get_parent(np);
- if (opb && !strcmp(opb->type, "opb")) {
+ if (opb && (!strcmp(opb->type, "opb") ||
+ of_device_is_compatible(opb, "ibm,opb"))) {
index = add_legacy_soc_port(np, np);
if (index >= 0 && np == stdout)
legacy_serial_console = index;
next prev parent reply other threads:[~2007-10-11 19:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-11 15:26 [PATCH] PowerPC: Fix find_legacy_serial_ports on OPB Valentine Barshak
2007-10-11 15:50 ` Arnd Bergmann
2007-10-11 15:53 ` Josh Boyer
2007-10-11 17:09 ` Arnd Bergmann
2007-10-11 19:09 ` Valentine Barshak [this message]
2007-10-11 21:10 ` [PATCH] PowerPC: Add legacy serial support for OPB with flattened device tree Arnd Bergmann
2007-10-11 17:26 ` [PATCH] PowerPC: Fix find_legacy_serial_ports on OPB Valentine Barshak
2007-10-11 18:31 ` Josh Boyer
2007-10-12 2:31 ` David Gibson
2007-10-12 11:49 ` Josh Boyer
2007-10-11 18:49 ` Valentine Barshak
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=20071011190925.GA22704@ru.mvista.com \
--to=vbarshak@ru$(echo .)mvista.com \
--cc=arnd@arndb$(echo .)de \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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