patch-2.4.25 linux-2.4.25/arch/mips/mips-boards/atlas/atlas_setup.c
Next file: linux-2.4.25/arch/mips/mips-boards/generic/time.c
Previous file: linux-2.4.25/arch/mips/lib/rtc-std.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/atlas/atlas_setup.c
- Orig date:
2003-08-25 04:44:40.000000000 -0700
diff -urN linux-2.4.24/arch/mips/mips-boards/atlas/atlas_setup.c linux-2.4.25/arch/mips/mips-boards/atlas/atlas_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>
@@ -33,11 +34,6 @@
#include <asm/time.h>
#include <asm/traps.h>
-#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_PROM_CONSOLE)
-extern void console_setup(char *, int *);
-char serial_console[20];
-#endif
-
#ifdef CONFIG_KGDB
extern void rs_kgdb_hook(int);
extern void saa9730_kgdb_hook(void);
@@ -75,14 +71,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)