aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r--arch/powerpc/kernel/setup_32.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index e5694335bf10..e5d285adb496 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -39,6 +39,8 @@
39#include <asm/nvram.h> 39#include <asm/nvram.h>
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>
43#include <asm/udbg.h>
42 44
43#include "setup.h" 45#include "setup.h"
44 46
@@ -172,12 +174,23 @@ void __init platform_init(void)
172 */ 174 */
173void __init machine_init(unsigned long dt_ptr, unsigned long phys) 175void __init machine_init(unsigned long dt_ptr, unsigned long phys)
174{ 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 */
175 early_init_devtree(__va(dt_ptr)); 185 early_init_devtree(__va(dt_ptr));
176 186
187 /* Check default command line */
177#ifdef CONFIG_CMDLINE 188#ifdef CONFIG_CMDLINE
178 strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); 189 if (cmd_line[0] == 0)
190 strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
179#endif /* CONFIG_CMDLINE */ 191#endif /* CONFIG_CMDLINE */
180 192
193 /* Base init based on machine type */
181 platform_init(); 194 platform_init();
182 195
183#ifdef CONFIG_6xx 196#ifdef CONFIG_6xx
@@ -282,25 +295,22 @@ void __init setup_arch(char **cmdline_p)
282 295
283 unflatten_device_tree(); 296 unflatten_device_tree();
284 check_for_initrd(); 297 check_for_initrd();
285 finish_device_tree();
286 298
287 smp_setup_cpu_maps(); 299 if (ppc_md.init_early)
300 ppc_md.init_early();
288 301
289#ifdef CONFIG_BOOTX_TEXT 302#ifdef CONFIG_SERIAL_8250
290 init_boot_display(); 303 find_legacy_serial_ports();
291#endif 304#endif
305 finish_device_tree();
292 306
293#ifdef CONFIG_PPC_PMAC 307 smp_setup_cpu_maps();
294 /* This could be called "early setup arch", it must be done
295 * now because xmon need it
296 */
297 if (_machine == _MACH_Pmac)
298 pmac_feature_init(); /* New cool way */
299#endif
300 308
301#ifdef CONFIG_XMON_DEFAULT 309#ifdef CONFIG_XMON_DEFAULT
302 xmon_init(1); 310 xmon_init(1);
303#endif 311#endif
312 /* Register early console */
313 register_early_udbg_console();
304 314
305#if defined(CONFIG_KGDB) 315#if defined(CONFIG_KGDB)
306 if (ppc_md.kgdb_map_scc) 316 if (ppc_md.kgdb_map_scc)