vserver 1.9.5.x5
[linux-2.6.git] / arch / ppc / kernel / setup.c
index 376f736..5e7ce4b 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/string.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/initrd.h>
@@ -226,6 +227,10 @@ int show_cpuinfo(struct seq_file *m, void *v)
                maj = ((pvr >> 8) & 0xFF) - 1;
                min = pvr & 0xFF;
                break;
+       case 0x8020:    /* e500 */
+               maj = PVR_MAJ(pvr);
+               min = PVR_MIN(pvr);
+               break;
        default:
                maj = (pvr >> 8) & 0xFF;
                min = pvr & 0xFF;
@@ -418,7 +423,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
         * are used for initrd_start and initrd_size,
         * otherwise they contain 0xdeadbeef.
         */
-       cmd_line[0] = 0;
        if (r3 >= 0x4000 && r3 < 0x800000 && r4 == 0) {
                strlcpy(cmd_line, (char *)r3 + KERNELBASE,
                        sizeof(cmd_line));
@@ -484,6 +488,9 @@ static int __init set_preferred_console(void)
        char *name;
        int offset;
 
+       if (of_stdout_device == NULL)
+               return -ENODEV;
+
        /* The user has requested a console so this is already set up. */
        if (strstr(saved_command_line, "console="))
                return -EBUSY;
@@ -675,7 +682,6 @@ arch_initcall(ppc_init);
 /* Warning, IO base is not yet inited */
 void __init setup_arch(char **cmdline_p)
 {
-       extern int panic_timeout;
        extern char *klimit;
        extern void do_init_bootmem(void);
 
@@ -744,6 +750,10 @@ void __init setup_arch(char **cmdline_p)
        if ( ppc_md.progress ) ppc_md.progress("ocp: exit", 0x3eab);
 #endif
 
+#ifdef CONFIG_DUMMY_CONSOLE
+       conswitchp = &dummy_con;
+#endif
+
        ppc_md.setup_arch();
        if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);