Merge branch 'linux-2.6' into for-linus
[powerpc.git] / arch / powerpc / kernel / setup_32.c
index e5a4481..04df53a 100644 (file)
@@ -2,7 +2,6 @@
  * Common prep/pmac/chrp boot and setup code.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/sched.h>
@@ -52,7 +51,6 @@
 
 extern void bootx_init(unsigned long r4, unsigned long phys);
 
-boot_infos_t *boot_infos;
 struct ide_machdep_calls ppc_ide_md;
 
 int boot_cpuid;
@@ -65,14 +63,6 @@ unsigned int DMA_MODE_WRITE;
 
 int have_of = 1;
 
-#ifdef CONFIG_PPC_MULTIPLATFORM
-dev_t boot_dev;
-#endif /* CONFIG_PPC_MULTIPLATFORM */
-
-#ifdef CONFIG_MAGIC_SYSRQ
-unsigned long SYSRQ_KEY = 0x54;
-#endif /* CONFIG_MAGIC_SYSRQ */
-
 #ifdef CONFIG_VGA_CONSOLE
 unsigned long vgacon_remap_base;
 #endif
@@ -97,6 +87,7 @@ int ucache_bsize;
 unsigned long __init early_init(unsigned long dt_ptr)
 {
        unsigned long offset = reloc_offset();
+       struct cpu_spec *spec;
 
        /* First zero the BSS -- use memset_io, some platforms don't have
         * caches on yet */
@@ -106,8 +97,11 @@ unsigned long __init early_init(unsigned long dt_ptr)
         * Identify the CPU type and fix up code sections
         * that depend on which cpu we have.
         */
-       identify_cpu(offset, 0);
-       do_cpu_ftr_fixups(offset);
+       spec = identify_cpu(offset);
+
+       do_feature_fixups(spec->cpu_features,
+                         PTRRELOC(&__start___ftr_fixup),
+                         PTRRELOC(&__stop___ftr_fixup));
 
        return KERNELBASE + offset;
 }
@@ -215,7 +209,7 @@ int __init ppc_init(void)
 
        /* register CPU devices */
        for_each_possible_cpu(i)
-               register_cpu(&cpu_devices[i], i, NULL);
+               register_cpu(&cpu_devices[i], i);
 
        /* call platform init */
        if (ppc_md.init != NULL) {
@@ -241,16 +235,14 @@ void __init setup_arch(char **cmdline_p)
                ppc_md.init_early();
 
        find_legacy_serial_ports();
-       finish_device_tree();
 
        smp_setup_cpu_maps();
 
-#ifdef CONFIG_XMON_DEFAULT
-       xmon_init(1);
-#endif
        /* Register early console */
        register_early_udbg_console();
 
+       xmon_setup();
+
 #if defined(CONFIG_KGDB)
        if (ppc_md.kgdb_map_scc)
                ppc_md.kgdb_map_scc();
@@ -287,9 +279,6 @@ void __init setup_arch(char **cmdline_p)
        init_mm.end_data = (unsigned long) _edata;
        init_mm.brk = klimit;
 
-       if (do_early_xmon)
-               debugger(NULL);
-
        /* set up the bootmem stuff with available memory */
        do_init_bootmem();
        if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab);