aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/console.h
diff options
context:
space:
mode:
authorYinghai Lu <Yinghai.Lu@Sun.COM>2007-07-16 02:37:59 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:05:35 -0400
commit18a8bd949d6adb311ea816125ff65050df1f3f6e (patch)
tree4365db908430747a5c08cacdb4354577b7bfead7 /include/linux/console.h
parentb1c931e39327ef121797927d4b3198d370e75b9b (diff)
serial: convert early_uart to earlycon for 8250
Beacuse SERIAL_PORT_DFNS is removed from include/asm-i386/serial.h and include/asm-x86_64/serial.h. the serial8250_ports need to be probed late in serial initializing stage. the console_init=>serial8250_console_init=> register_console=>serial8250_console_setup will return -ENDEV, and console ttyS0 can not be enabled at that time. need to wait till uart_add_one_port in drivers/serial/serial_core.c to call register_console to get console ttyS0. that is too late. Make early_uart to use early_param, so uart console can be used earlier. Make it to be bootconsole with CON_BOOT flag, so can use console handover feature. and it will switch to corresponding normal serial console automatically. new command line will be: console=uart8250,io,0x3f8,9600n8 console=uart8250,mmio,0xff5e0000,115200n8 or earlycon=uart8250,io,0x3f8,9600n8 earlycon=uart8250,mmio,0xff5e0000,115200n8 it will print in very early stage: Early serial console at I/O port 0x3f8 (options '9600n8') console [uart0] enabled later for console it will print: console handover: boot [uart0] -> real [ttyS0] Signed-off-by: <yinghai.lu@sun.com> Cc: Andi Kleen <ak@suse.de> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Gerd Hoffmann <kraxel@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/console.h')
-rw-r--r--include/linux/console.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index 62ef6e11d0d..c44d3dfde7a 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -99,6 +99,7 @@ struct console {
99 struct tty_driver *(*device)(struct console *, int *); 99 struct tty_driver *(*device)(struct console *, int *);
100 void (*unblank)(void); 100 void (*unblank)(void);
101 int (*setup)(struct console *, char *); 101 int (*setup)(struct console *, char *);
102 int (*early_setup)(void);
102 short flags; 103 short flags;
103 short index; 104 short index;
104 int cflag; 105 int cflag;
@@ -107,6 +108,7 @@ struct console {
107}; 108};
108 109
109extern int add_preferred_console(char *name, int idx, char *options); 110extern int add_preferred_console(char *name, int idx, char *options);
111extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options);
110extern void register_console(struct console *); 112extern void register_console(struct console *);
111extern int unregister_console(struct console *); 113extern int unregister_console(struct console *);
112extern struct console *console_drivers; 114extern struct console *console_drivers;