This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / ia64 / kernel / setup.c
index 7b2033b..da88d28 100644 (file)
@@ -258,6 +258,25 @@ io_port_init (void)
        num_io_spaces = 1;
 }
 
+#ifdef CONFIG_SERIAL_8250_CONSOLE
+static void __init
+setup_serial_legacy (void)
+{
+       struct uart_port port;
+       unsigned int i, iobase[] = {0x3f8, 0x2f8};
+
+       printk(KERN_INFO "Registering legacy COM ports for serial console\n");
+       memset(&port, 0, sizeof(port));
+       port.iotype = SERIAL_IO_PORT;
+       port.uartclk = BASE_BAUD * 16;
+       for (i = 0; i < ARRAY_SIZE(iobase); i++) {
+               port.line = i;
+               port.iobase = iobase[i];
+               early_serial_setup(&port);
+       }
+}
+#endif
+
 /**
  * early_console_setup - setup debugging console
  *
@@ -268,36 +287,19 @@ io_port_init (void)
  * Returns non-zero if a console couldn't be setup.
  */
 static inline int __init
-early_console_setup (char *cmdline)
+early_console_setup (void)
 {
 #ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
        {
                extern int sn_serial_console_early_setup(void);
-               if (!sn_serial_console_early_setup())
+               if(!sn_serial_console_early_setup())
                        return 0;
        }
 #endif
-#ifdef CONFIG_EFI_PCDP
-       if (!efi_setup_pcdp_console(cmdline))
-               return 0;
-#endif
-#ifdef CONFIG_SERIAL_8250_CONSOLE
-       if (!early_serial_console_init(cmdline))
-               return 0;
-#endif
 
        return -1;
 }
 
-static inline void
-mark_bsp_online (void)
-{
-#ifdef CONFIG_SMP
-       /* If we register an early console, allow CPU 0 to printk */
-       cpu_set(smp_processor_id(), cpu_online_map);
-#endif
-}
-
 void __init
 setup_arch (char **cmdline_p)
 {
@@ -315,8 +317,11 @@ setup_arch (char **cmdline_p)
        machvec_init(acpi_get_sysname());
 #endif
 
-       if (early_console_setup(*cmdline_p) == 0)
-               mark_bsp_online();
+#ifdef CONFIG_SMP
+       /* If we register an early console, allow CPU 0 to printk */
+       if (!early_console_setup())
+               cpu_set(smp_processor_id(), cpu_online_map);
+#endif
 
 #ifdef CONFIG_ACPI_BOOT
        /* Initialize the ACPI boot-time table parser */
@@ -344,6 +349,13 @@ setup_arch (char **cmdline_p)
 #ifdef CONFIG_ACPI_BOOT
        acpi_boot_init();
 #endif
+#ifdef CONFIG_EFI_PCDP
+       efi_setup_pcdp_console(*cmdline_p);
+#endif
+#ifdef CONFIG_SERIAL_8250_CONSOLE
+       if (!efi.hcdp)
+               setup_serial_legacy();
+#endif
 
 #ifdef CONFIG_VT
        if (!conswitchp) {