summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-02-13 04:54:22 (GMT)
committerPaul Mackerras <paulus@samba.org>2007-02-14 00:55:16 (GMT)
commit719c91ccadd3ed26570dbb29d54166914832eee9 (patch)
treeee11ec26fbbb096d034468379241e872cbd63548
parent8d38a5b2fab1397d35ba1c92828a91b77ce9f865 (diff)
downloadlinux-719c91ccadd3ed26570dbb29d54166914832eee9.tar.xz
[POWERPC] Use udbg_early_init() on ppc32
udbg_early_init() is a function used on 64 bit systems, which initializes whichever early udbg backend is configured. This function is not called on 32-bit, however if btext early debug is enabled it does have an explicit, inline, #ifdef-ed assignment performing analagous initialization. This patch makes things more uniform by folding the btext initialization as an option into udbg_early_init() and calling that from the 32-bit setup path. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/btext.c9
-rw-r--r--arch/powerpc/kernel/setup_32.c8
-rw-r--r--arch/powerpc/kernel/udbg.c2
-rw-r--r--include/asm-powerpc/udbg.h1
4 files changed, 14 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index 93f21aa..3678997 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -18,6 +18,7 @@
#include <asm/io.h>
#include <asm/lmb.h>
#include <asm/processor.h>
+#include <asm/udbg.h>
#define NO_SCROLL
@@ -912,3 +913,11 @@ static unsigned char vga_font[cmapsz] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
};
+
+void __init udbg_init_btext(void)
+{
+ /* If btext is enabled, we might have a BAT setup for early display,
+ * thus we do enable some very basic udbg output
+ */
+ udbg_putc = btext_drawchar;
+}
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 6a19fa4..44a6a3c 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -116,12 +116,8 @@ unsigned long __init early_init(unsigned long dt_ptr)
*/
void __init machine_init(unsigned long dt_ptr, unsigned long phys)
{
- /* If btext is enabled, we might have a BAT setup for early display,
- * thus we do enable some very basic udbg output
- */
-#ifdef CONFIG_BOOTX_TEXT
- udbg_putc = btext_drawchar;
-#endif
+ /* Enable early debugging if any specified (see udbg.h) */
+ udbg_early_init();
/* Do some early initialization based on the flat device tree */
early_init_devtree(__va(dt_ptr));
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 194a93e..7e09718 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -49,6 +49,8 @@ void __init udbg_early_init(void)
udbg_init_debug_beat();
#elif defined(CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE)
udbg_init_pas_realmode();
+#elif defined(CONFIG_BOOTX_TEXT)
+ udbg_init_btext();
#endif
}
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h
index 4cbc313..d03d855 100644
--- a/include/asm-powerpc/udbg.h
+++ b/include/asm-powerpc/udbg.h
@@ -46,6 +46,7 @@ extern void __init udbg_init_iseries(void);
extern void __init udbg_init_rtas_panel(void);
extern void __init udbg_init_rtas_console(void);
extern void __init udbg_init_debug_beat(void);
+extern void __init udbg_init_btext(void);
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_UDBG_H */