ppc64: Rearrange btext initialization for consistency with ppc32
[deliverable/linux.git] / arch / ppc64 / kernel / setup.c
index d0bb68af0ea41d48bca4bc945d6e727ffcd2a424..44ee6ebe9a603a24eabdf3f74685a56e7d988816 100644 (file)
@@ -58,6 +58,7 @@
 #include <asm/mmu.h>
 #include <asm/lmb.h>
 #include <asm/iSeries/ItLpNaca.h>
+#include <asm/firmware.h>
 
 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
@@ -153,7 +154,7 @@ struct screen_info screen_info = {
        .orig_video_points = 16
 };
 
-#if defined(CONFIG_PPC_MULTIPLATFORM) && defined(CONFIG_SMP)
+#ifdef CONFIG_SMP
 
 static int smt_enabled_cmdline;
 
@@ -306,15 +307,13 @@ static void __init setup_cpu_maps(void)
 
        systemcfg->processorCount = num_present_cpus();
 }
-#endif /* defined(CONFIG_PPC_MULTIPLATFORM) && defined(CONFIG_SMP) */
-
-
-#ifdef CONFIG_PPC_MULTIPLATFORM
+#endif /* CONFIG_SMP */
 
 extern struct machdep_calls pSeries_md;
 extern struct machdep_calls pmac_md;
 extern struct machdep_calls maple_md;
 extern struct machdep_calls bpa_md;
+extern struct machdep_calls iseries_md;
 
 /* Ultimately, stuff them in an elf section like initcalls... */
 static struct machdep_calls __initdata *machines[] = {
@@ -329,6 +328,9 @@ static struct machdep_calls __initdata *machines[] = {
 #endif /* CONFIG_PPC_MAPLE */
 #ifdef CONFIG_PPC_BPA
        &bpa_md,
+#endif
+#ifdef CONFIG_PPC_ISERIES
+       &iseries_md,
 #endif
        NULL
 };
@@ -401,7 +403,8 @@ void __init early_setup(unsigned long dt_ptr)
        /*
         * Initialize stab / SLB management
         */
-       stab_initialize(lpaca->stab_real);
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               stab_initialize(lpaca->stab_real);
 
        /*
         * Initialize the MMU Hash table and create the linear mapping
@@ -532,8 +535,6 @@ static void __init check_for_initrd(void)
 #endif /* CONFIG_BLK_DEV_INITRD */
 }
 
-#endif /* CONFIG_PPC_MULTIPLATFORM */
-
 /*
  * Do some initial setup of the system.  The parameters are those which 
  * were passed in from the bootloader.
@@ -542,14 +543,6 @@ void __init setup_system(void)
 {
        DBG(" -> setup_system()\n");
 
-#ifdef CONFIG_PPC_ISERIES
-       /* pSeries systems are identified in prom.c via OF. */
-       if (itLpNaca.xLparInstalled == 1)
-               systemcfg->platform = PLATFORM_ISERIES_LPAR;
-
-       ppc_md.init_early();
-#else /* CONFIG_PPC_ISERIES */
-
        /*
         * Unflatten the device-tree passed by prom_init or kexec
         */
@@ -592,6 +585,10 @@ void __init setup_system(void)
         */
        finish_device_tree();
 
+#ifdef CONFIG_BOOTX_TEXT
+       init_boot_display();
+#endif
+
        /*
         * Initialize xmon
         */
@@ -607,9 +604,8 @@ void __init setup_system(void)
        strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
 
        parse_early_param();
-#endif /* !CONFIG_PPC_ISERIES */
 
-#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES)
+#ifdef CONFIG_SMP
        /*
         * iSeries has already initialized the cpu maps at this point.
         */
@@ -619,7 +615,7 @@ void __init setup_system(void)
         * we can map physical -> logical CPU ids
         */
        smp_release_cpus();
-#endif /* defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES) */
+#endif
 
        printk("Starting Linux PPC64 %s\n", system_utsname.version);
 
@@ -711,8 +707,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
        if (cpu_id == NR_CPUS) {
                seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq);
 
-               if (ppc_md.get_cpuinfo != NULL)
-                       ppc_md.get_cpuinfo(m);
+               if (ppc_md.show_cpuinfo != NULL)
+                       ppc_md.show_cpuinfo(m);
 
                return 0;
        }
@@ -1047,6 +1043,10 @@ void __init setup_arch(char **cmdline_p)
        /* initialize the syscall map in systemcfg */
        setup_syscall_map();
 
+#ifdef CONFIG_DUMMY_CONSOLE
+       conswitchp = &dummy_con;
+#endif
+
        ppc_md.setup_arch();
 
        /* Use the default idle loop if the platform hasn't provided one. */
@@ -1064,8 +1064,6 @@ void __init setup_arch(char **cmdline_p)
 #define PPC64_LINUX_FUNCTION 0x0f000000
 #define PPC64_IPL_MESSAGE 0xc0000000
 #define PPC64_TERM_MESSAGE 0xb0000000
-#define PPC64_ATTN_MESSAGE 0xa0000000
-#define PPC64_DUMP_MESSAGE 0xd0000000
 
 static void ppc64_do_msg(unsigned int src, const char *msg)
 {
@@ -1093,29 +1091,6 @@ void ppc64_terminate_msg(unsigned int src, const char *msg)
        printk("[terminate]%04x %s\n", src, msg);
 }
 
-/* Print something that needs attention (device error, etc) */
-void ppc64_attention_msg(unsigned int src, const char *msg)
-{
-       ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_ATTN_MESSAGE|src, msg);
-       printk("[attention]%04x %s\n", src, msg);
-}
-
-/* Print a dump progress message. */
-void ppc64_dump_msg(unsigned int src, const char *msg)
-{
-       ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_DUMP_MESSAGE|src, msg);
-       printk("[dump]%04x %s\n", src, msg);
-}
-
-/* This should only be called on processor 0 during calibrate decr */
-void __init setup_default_decr(void)
-{
-       struct paca_struct *lpaca = get_paca();
-
-       lpaca->default_decr = tb_ticks_per_jiffy;
-       lpaca->next_jiffy_update_tb = get_tb() + tb_ticks_per_jiffy;
-}
-
 #ifndef CONFIG_PPC_ISERIES
 /*
  * This function can be used by platforms to "find" legacy serial ports.
@@ -1283,7 +1258,7 @@ void __init generic_find_legacy_serial_ports(u64 *physport,
 
 static struct platform_device serial_device = {
        .name   = "serial8250",
-       .id     = 0,
+       .id     = PLAT8250_DEV_PLATFORM,
        .dev    = {
                .platform_data = serial_ports,
        },
This page took 0.025384 seconds and 5 git commands to generate.