[POWERPC] powerpc: Make RTAS console init generic
authorMichael Neuling <mikey@neuling.org>
Thu, 17 Aug 2006 04:12:14 +0000 (23:12 -0500)
committerPaul Mackerras <paulus@samba.org>
Fri, 25 Aug 2006 03:27:35 +0000 (13:27 +1000)
The rtas console doesn't have to be Cell specific.  If we get both
RTAS tokens, we should just enabled the console then and there.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/Kconfig
arch/powerpc/kernel/rtas.c
arch/powerpc/platforms/cell/setup.c

index 13e583f16ede5738c2777dfbdb552d326d7be489..7f782b338e8e50a94fabe21be67eaef108005027 100644 (file)
@@ -426,7 +426,8 @@ config PPC_IBM_CELL_BLADE
        select UDBG_RTAS_CONSOLE
 
 config UDBG_RTAS_CONSOLE
-       bool
+       bool "RTAS based debug console"
+       depends on PPC_RTAS
        default n
 
 config XICS
index bfd66d3a035c97633a57790718e9cea86647a4c5..6b0699b82b41a3f01259aef4350d4a91a1730d98 100644 (file)
@@ -910,6 +910,11 @@ int __init early_init_dt_scan_rtas(unsigned long node,
        basep = of_get_flat_dt_prop(node, "get-term-char", NULL);
        if (basep)
                rtas_getchar_token = *basep;
+
+       if (rtas_putchar_token != RTAS_UNKNOWN_SERVICE &&
+           rtas_getchar_token != RTAS_UNKNOWN_SERVICE)
+               udbg_init_rtas_console();
+
 #endif
 
        /* break now */
index 282987d6d4a2165272e3eef5ad68d15fd411a8e9..22c228a49c3373af2cd287b325cea089ad961efa 100644 (file)
@@ -150,10 +150,6 @@ static int __init cell_probe(void)
            !of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
                return 0;
 
-#ifdef CONFIG_UDBG_RTAS_CONSOLE
-       udbg_init_rtas_console();
-#endif
-
        hpte_init_native();
 
        return 1;