Skip to contentSkip to conversation

powerpc: Make RTAS console init generic

PATCH In review Michael Neuling 2 participants 5 messages Aug 16, 2006 – Aug 17, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Make RTAS console init generic

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.

---
Updated Kconfig so we can enable it.

 arch/powerpc/Kconfig                |    2 +-
 arch/powerpc/kernel/rtas.c          |    5 +++++
 arch/powerpc/platforms/cell/setup.c |    4 ----
 3 files changed, 6 insertions(+), 5 deletions(-)
arch/powerpc/Kconfig +1 -1
Index: linux-2.6-ozlabs/arch/powerpc/Kconfig
===================================================================
@@ -426,7 +426,7 @@ config PPC_IBM_CELL_BLADE
 	select UDBG_RTAS_CONSOLE
 
 config UDBG_RTAS_CONSOLE
-	bool
+	bool "RTAS based debug console"
 	default n
 
 config XICS
arch/powerpc/kernel/rtas.c +5 -0
Index: linux-2.6-ozlabs/arch/powerpc/kernel/rtas.c
===================================================================
@@ -910,6 +910,11 @@ int __init early_init_dt_scan_rtas(unsig
 	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 */
arch/powerpc/platforms/cell/setup.c +0 -4
Index: linux-2.6-ozlabs/arch/powerpc/platforms/cell/setup.c
===================================================================
@@ -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;
#1 lore raw
Quoted 3 lines · Michael Neuling

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.

Seems to work fine on Cell.

Quoted 1 line

Updated Kconfig so we can enable it.

I enable it via the early debugging menu (under kernel hacking), is that not good enough?

Quoted 10 lines
 arch/powerpc/Kconfig                |    2 +-
 arch/powerpc/kernel/rtas.c          |    5 +++++
 arch/powerpc/platforms/cell/setup.c |    4 ----
 3 files changed, 6 insertions(+), 5 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/Kconfig
===================================================================

arch/powerpc/Kconfig config PPC_IBM_CELL_BLADE · line 430

Quoted 6 lines
arch/powerpc/Kconfig +1 -1
@@ -426,7 +426,7 @@ config PPC_IBM_CELL_BLADE
 	select UDBG_RTAS_CONSOLE
 
 config UDBG_RTAS_CONSOLE
-	bool
+	bool "RTAS based debug console"
 	default n

This should probably depend on RTAS?

cheers

Signature · 8 lines
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
#2 lore raw
Quoted 1 line

Seems to work fine on Cell.

Kewl

Quoted 4 lines
Quoted 1 line

Updated Kconfig so we can enable it.

I enable it via the early debugging menu (under kernel hacking), is that not good enough?

Doesn't that enable CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE not CONFIG_UDBG_RTAS_CONSOLE?

Without the Kconfig update you don't seem to get presented with an option but I'm no kbuild expert.

Quoted 6 lines

arch/powerpc/Kconfig config PPC_IBM_CELL_BLADE · line 430

Quoted 4 lines

config UDBG_RTAS_CONSOLE

arch/powerpc/Kconfig +1 -1
-	bool
+	bool "RTAS based debug console"
 	default n

This should probably depend on RTAS?

Yeap.

Mikey

#3 lore raw
Quoted 11 lines · Michael Neuling
Quoted 1 line

Seems to work fine on Cell.

Kewl

Quoted 4 lines
Quoted 1 line

Updated Kconfig so we can enable it.

I enable it via the early debugging menu (under kernel hacking), is that not good enough?

Doesn't that enable CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE not CONFIG_UDBG_RTAS_CONSOLE?

Yeah, but that then turns on CONFIG_UDBG_RTAS_CONSOLE also. I guess you guys want to be able to turn on the later without the former, so fair enough. We turn it on always on the Cell via the PPC_IBM_CELL_BLADE entry.

cheers

Signature · 8 lines
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
#4 lore raw
Quoted 3 lines

Yeah, but that then turns on CONFIG_UDBG_RTAS_CONSOLE also. I guess you guys want to be able to turn on the later without the former, so fair enough.

Yeap.

Mikey