Commit 719c91cc authored by David Gibson's avatar David Gibson Committed by Paul Mackerras

[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: default avatarDavid Gibson <dwg@au1.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 8d38a5b2
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/lmb.h> #include <asm/lmb.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/udbg.h>
#define NO_SCROLL #define NO_SCROLL
...@@ -912,3 +913,11 @@ static unsigned char vga_font[cmapsz] = { ...@@ -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, 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;
}
...@@ -116,12 +116,8 @@ unsigned long __init early_init(unsigned long dt_ptr) ...@@ -116,12 +116,8 @@ unsigned long __init early_init(unsigned long dt_ptr)
*/ */
void __init machine_init(unsigned long dt_ptr, unsigned long phys) void __init machine_init(unsigned long dt_ptr, unsigned long phys)
{ {
/* If btext is enabled, we might have a BAT setup for early display, /* Enable early debugging if any specified (see udbg.h) */
* thus we do enable some very basic udbg output udbg_early_init();
*/
#ifdef CONFIG_BOOTX_TEXT
udbg_putc = btext_drawchar;
#endif
/* Do some early initialization based on the flat device tree */ /* Do some early initialization based on the flat device tree */
early_init_devtree(__va(dt_ptr)); early_init_devtree(__va(dt_ptr));
......
...@@ -49,6 +49,8 @@ void __init udbg_early_init(void) ...@@ -49,6 +49,8 @@ void __init udbg_early_init(void)
udbg_init_debug_beat(); udbg_init_debug_beat();
#elif defined(CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE) #elif defined(CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE)
udbg_init_pas_realmode(); udbg_init_pas_realmode();
#elif defined(CONFIG_BOOTX_TEXT)
udbg_init_btext();
#endif #endif
} }
......
...@@ -46,6 +46,7 @@ extern void __init udbg_init_iseries(void); ...@@ -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_panel(void);
extern void __init udbg_init_rtas_console(void); extern void __init udbg_init_rtas_console(void);
extern void __init udbg_init_debug_beat(void); extern void __init udbg_init_debug_beat(void);
extern void __init udbg_init_btext(void);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_UDBG_H */ #endif /* _ASM_POWERPC_UDBG_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment