]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/legacy_serial.c
[POWERPC] Add legacy serial support for OPB with flattened device tree
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / legacy_serial.c
index cea8045ba40b33a3f56346c4460cfd88bde9eac5..4ed58875ee17ffe490268e6fb5f36dd14c27ae6a 100644 (file)
@@ -340,9 +340,10 @@ void __init find_legacy_serial_ports(void)
        }
 
        /* 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;
@@ -493,7 +494,7 @@ static int __init serial_dev_init(void)
 
        return platform_device_register(&serial_device);
 }
-arch_initcall(serial_dev_init);
+device_initcall(serial_dev_init);
 
 
 /*