[PATCH] powerpc: Make RTAS console init generic

STALE7290d

5 messages, 2 authors, 2006-08-17 · open the first message on its own page

[PATCH] powerpc: Make RTAS console init generic

From: Michael Neuling <hidden>
Date: 2006-08-16 19:42:21

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 <redacted>
---
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(-)

Index: linux-2.6-ozlabs/arch/powerpc/Kconfig
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/Kconfig
+++ 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
Index: linux-2.6-ozlabs/arch/powerpc/kernel/rtas.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/rtas.c
+++ 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 */
Index: linux-2.6-ozlabs/arch/powerpc/platforms/cell/setup.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/platforms/cell/setup.c
+++ 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;

Re: [PATCH] powerpc: Make RTAS console init generic

From: Michael Ellerman <hidden>
Date: 2006-08-17 02:04:27

On Wed, 2006-08-16 at 14:42 -0500, Michael Neuling wrote:
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.
Updated Kconfig so we can enable it.  
I enable it via the early debugging menu (under kernel hacking), is that
not good enough?
quoted hunk
 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
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/Kconfig
+++ 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
This should probably depend on RTAS?

cheers

-- 
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

Re: [PATCH] powerpc: Make RTAS console init generic

From: Michael Neuling <hidden>
Date: 2006-08-17 03:27:15

Seems to work fine on Cell.
Kewl
quoted
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
 config UDBG_RTAS_CONSOLE
-	bool
+	bool "RTAS based debug console"
 	default n
This should probably depend on RTAS?
Yeap.

Mikey

Re: [PATCH] powerpc: Make RTAS console init generic

From: Michael Ellerman <hidden>
Date: 2006-08-17 03:45:32

On Wed, 2006-08-16 at 22:27 -0500, Michael Neuling wrote:
quoted
Seems to work fine on Cell.
Kewl
quoted
quoted
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

-- 
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

Re: [PATCH] powerpc: Make RTAS console init generic

From: Michael Neuling <hidden>
Date: 2006-08-17 04:02:30

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help