13 #include <linux/types.h>
14 #include <linux/sched.h>
17 #include <asm/processor.h>
31 #if defined(CONFIG_PPC_EARLY_DEBUG_LPAR)
33 udbg_init_debug_lpar();
34 #elif defined(CONFIG_PPC_EARLY_DEBUG_LPAR_HVSI)
36 udbg_init_debug_lpar_hvsi();
37 #elif defined(CONFIG_PPC_EARLY_DEBUG_G5)
39 udbg_init_pmac_realmode();
40 #elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL)
43 #elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE)
45 udbg_init_rtas_console();
46 #elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE)
48 udbg_init_maple_realmode();
49 #elif defined(CONFIG_PPC_EARLY_DEBUG_BEAT)
51 #elif defined(CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE)
52 udbg_init_pas_realmode();
53 #elif defined(CONFIG_BOOTX_TEXT)
55 #elif defined(CONFIG_PPC_EARLY_DEBUG_44x)
58 #elif defined(CONFIG_PPC_EARLY_DEBUG_40x)
60 udbg_init_40x_realmode();
61 #elif defined(CONFIG_PPC_EARLY_DEBUG_CPM)
63 #elif defined(CONFIG_PPC_EARLY_DEBUG_USBGECKO)
65 #elif defined(CONFIG_PPC_EARLY_DEBUG_WSP)
67 #elif defined(CONFIG_PPC_EARLY_DEBUG_EHV_BC)
69 #elif defined(CONFIG_PPC_EARLY_DEBUG_PS3GELIC)
71 #elif defined(CONFIG_PPC_EARLY_DEBUG_OPAL_RAW)
72 udbg_init_debug_opal_raw();
73 #elif defined(CONFIG_PPC_EARLY_DEBUG_OPAL_HVSI)
74 udbg_init_debug_opal_hvsi();
77 #ifdef CONFIG_PPC_EARLY_DEBUG
90 if (s && *s !=
'\0') {
91 while ((c = *s++) !=
'\0')
113 if (s && *s !=
'\0') {
114 while (((c = *s++) !=
'\0') && (remain-- > 0)) {
136 if (c == -1 && i == 0)
139 }
while (c == 0x11 || c == 0x13);
140 if (c == 0 || c == -1)
148 #define UDBG_BUFSIZE 256
169 static void udbg_console_write(
struct console *
con,
const char *
s,
175 static struct console udbg_console = {
177 .write = udbg_console_write,
182 static int early_console_initialized;
190 if (early_console_initialized)
200 early_console_initialized = 1;