diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-11-23 01:57:25 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 22:49:54 -0500 |
commit | 51d3082fe6e55aecfa17113dbe98077c749f724c (patch) | |
tree | 9a1e2355d5988d8cc1ca511d53c1bb24b0baa17f /arch/powerpc/kernel/setup_32.c | |
parent | 463ce0e103f419f51b1769111e73fe8bb305d0ec (diff) |
[PATCH] powerpc: Unify udbg (#2)
This patch unifies udbg for both ppc32 and ppc64 when building the
merged achitecture. xmon now has a single "back end". The powermac udbg
stuff gets enriched with some ADB capabilities and btext output. In
addition, the early_init callback is now called on ppc32 as well,
approx. in the same order as ppc64 regarding device-tree manipulations.
The init sequences of ppc32 and ppc64 are getting closer, I'll unify
them in a later patch.
For now, you can force udbg to the scc using "sccdbg" or to btext using
"btextdbg" on powermacs. I'll implement a cleaner way of forcing udbg
output to something else than the autodetected OF output device in a
later patch.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 02baacf04366..79d434fc14d2 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <asm/xmon.h> | 40 | #include <asm/xmon.h> |
41 | #include <asm/time.h> | 41 | #include <asm/time.h> |
42 | #include <asm/serial.h> | 42 | #include <asm/serial.h> |
43 | #include <asm/udbg.h> | ||
43 | 44 | ||
44 | #include "setup.h" | 45 | #include "setup.h" |
45 | 46 | ||
@@ -173,12 +174,23 @@ void __init platform_init(void) | |||
173 | */ | 174 | */ |
174 | void __init machine_init(unsigned long dt_ptr, unsigned long phys) | 175 | void __init machine_init(unsigned long dt_ptr, unsigned long phys) |
175 | { | 176 | { |
177 | /* If btext is enabled, we might have a BAT setup for early display, | ||
178 | * thus we do enable some very basic udbg output | ||
179 | */ | ||
180 | #ifdef CONFIG_BOOTX_TEXT | ||
181 | udbg_putc = btext_drawchar; | ||
182 | #endif | ||
183 | |||
184 | /* Do some early initialization based on the flat device tree */ | ||
176 | early_init_devtree(__va(dt_ptr)); | 185 | early_init_devtree(__va(dt_ptr)); |
177 | 186 | ||
187 | /* Check default command line */ | ||
178 | #ifdef CONFIG_CMDLINE | 188 | #ifdef CONFIG_CMDLINE |
179 | strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); | 189 | if (cmd_line[0] == 0) |
190 | strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); | ||
180 | #endif /* CONFIG_CMDLINE */ | 191 | #endif /* CONFIG_CMDLINE */ |
181 | 192 | ||
193 | /* Base init based on machine type */ | ||
182 | platform_init(); | 194 | platform_init(); |
183 | 195 | ||
184 | #ifdef CONFIG_6xx | 196 | #ifdef CONFIG_6xx |
@@ -294,21 +306,11 @@ void __init setup_arch(char **cmdline_p) | |||
294 | 306 | ||
295 | smp_setup_cpu_maps(); | 307 | smp_setup_cpu_maps(); |
296 | 308 | ||
297 | #ifdef CONFIG_BOOTX_TEXT | ||
298 | init_boot_display(); | ||
299 | #endif | ||
300 | |||
301 | #ifdef CONFIG_PPC_PMAC | ||
302 | /* This could be called "early setup arch", it must be done | ||
303 | * now because xmon need it | ||
304 | */ | ||
305 | if (_machine == _MACH_Pmac) | ||
306 | pmac_feature_init(); /* New cool way */ | ||
307 | #endif | ||
308 | |||
309 | #ifdef CONFIG_XMON_DEFAULT | 309 | #ifdef CONFIG_XMON_DEFAULT |
310 | xmon_init(1); | 310 | xmon_init(1); |
311 | #endif | 311 | #endif |
312 | /* Register early console */ | ||
313 | register_early_udbg_console(); | ||
312 | 314 | ||
313 | #if defined(CONFIG_KGDB) | 315 | #if defined(CONFIG_KGDB) |
314 | if (ppc_md.kgdb_map_scc) | 316 | if (ppc_md.kgdb_map_scc) |