]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Fix console output getting dropped on platforms without udbg_putc
authorMilton Miller <miltonm@bga.com>
Sun, 10 Jun 2007 04:32:43 +0000 (14:32 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 14 Jun 2007 01:56:17 +0000 (11:56 +1000)
Previously, registering this early console would just result
in dropping early buffered printk output until a udbg_putc
was registered.

However, commit 69331af79cf29e26d1231152a172a1a10c2df511
clears the CON_PRINTBUFFER flag on the main console when a
CON_BOOT (early) console has been registered, resulting in
the buffered messages never being displayed to the user.

This fixes the problem by making sure we don't register udbg_console
on platforms that don't implement udbg_putc.

Signed-off-by: Milton Miller <miltonm@bga.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/udbg.c

index 87703df87509031c6b163065a7afd08cb56ca593..cbca1df8bc60f996edb343bf86a6944ecfdae108 100644 (file)
@@ -151,12 +151,18 @@ static struct console udbg_console = {
 
 static int early_console_initialized;
 
-/* called by setup_system */
+/*
+ * Called by setup_system after ppc_md->probe and ppc_md->early_init.
+ * Call it again after setting udbg_putc in ppc_md->setup_arch.
+ */
 void register_early_udbg_console(void)
 {
        if (early_console_initialized)
                return;
 
+       if (!udbg_putc)
+               return;
+
        if (strstr(boot_command_line, "udbg-immortal")) {
                printk(KERN_INFO "early console immortal !\n");
                udbg_console.flags &= ~CON_BOOT;