patch-2.4.25 linux-2.4.25/arch/mips/mips-boards/sead/sead_setup.c
Next file: linux-2.4.25/arch/mips/mm/Makefile
Previous file: linux-2.4.25/arch/mips/mips-boards/malta/malta_setup.c
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
2004-02-18 05:36:30.000000000 -0800
- Orig file:
linux-2.4.24/arch/mips/mips-boards/sead/sead_setup.c
- Orig date:
2003-08-25 04:44:40.000000000 -0700
diff -urN linux-2.4.24/arch/mips/mips-boards/sead/sead_setup.c linux-2.4.25/arch/mips/mips-boards/sead/sead_setup.c
@@ -22,6 +22,7 @@
#include <linux/sched.h>
#include <linux/mc146818rtc.h>
#include <linux/ioport.h>
+#include <linux/console.h>
#include <asm/cpu.h>
#include <asm/bootinfo.h>
@@ -31,11 +32,6 @@
#include <asm/mips-boards/seadint.h>
#include <asm/time.h>
-#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_PROM_CONSOLE)
-extern void console_setup(char *, int *);
-char serial_console[20];
-#endif
-
extern void mips_reboot_setup(void);
extern void mips_time_init(void);
extern void mips_timer_setup(struct irqaction *irq);
@@ -54,14 +50,20 @@
#ifdef CONFIG_SERIAL_CONSOLE
argptr = prom_getcmdline();
if ((argptr = strstr(argptr, "console=ttyS0")) == NULL) {
- int i = 0;
+ struct console_cmdline *c = &console_cmdline[0];
char *s = prom_getenv("modetty0");
- while(s[i] >= '0' && s[i] <= '9')
+ int i = 0;
+ static char options[8];
+ while (s && s[i] >= '0' && s[i] <= '9') {
+ options[i] = s[i];
i++;
- strcpy(serial_console, "ttyS0,");
- strncpy(serial_console + 6, s, i);
- prom_printf("Config serial console: %s\n", serial_console);
- console_setup(serial_console, NULL);
+ }
+ options[i] = 0;
+ strcpy(c->name, "ttyS");
+ c->options = s ? options : NULL;
+ c->index = 0;
+ prom_printf("Serial console: %s%d %s\n",
+ c->name, c->index, options);
}
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)