diff options
author | Valentine Barshak <vbarshak@ru.mvista.com> | 2007-10-11 15:09:25 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-10-12 00:05:18 -0400 |
commit | b63db45ca44a805ef21eb10a3750e88419156423 (patch) | |
tree | 9bc8fdb03c4eee5fffea104ad6dd646aff67c9bd /arch | |
parent | 1189be6508d45183013ddb82b18f4934193de274 (diff) |
[POWERPC] Add legacy serial support for OPB with flattened device tree
Currently find_legacy_serial_ports() can find no serial ports on the
OPB with flattened device tree. 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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/legacy_serial.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 90fa11c72e1c..4ed58875ee17 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
@@ -340,9 +340,10 @@ void __init find_legacy_serial_ports(void) | |||
340 | } | 340 | } |
341 | 341 | ||
342 | /* First fill our array with opb bus ports */ | 342 | /* First fill our array with opb bus ports */ |
343 | for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16750")) != NULL;) { | 343 | for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) { |
344 | struct device_node *opb = of_get_parent(np); | 344 | struct device_node *opb = of_get_parent(np); |
345 | if (opb && !strcmp(opb->type, "opb")) { | 345 | if (opb && (!strcmp(opb->type, "opb") || |
346 | of_device_is_compatible(opb, "ibm,opb"))) { | ||
346 | index = add_legacy_soc_port(np, np); | 347 | index = add_legacy_soc_port(np, np); |
347 | if (index >= 0 && np == stdout) | 348 | if (index >= 0 && np == stdout) |
348 | legacy_serial_console = index; | 349 | legacy_serial_console = index; |