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>
Showing
- Documentation/kernel-parameters.txt 9 additions, 2 deletionsDocumentation/kernel-parameters.txt
- arch/ia64/kernel/setup.c 0 additions, 4 deletionsarch/ia64/kernel/setup.c
- drivers/firmware/pcdp.c 4 additions, 2 deletionsdrivers/firmware/pcdp.c
- drivers/serial/8250.c 7 additions, 21 deletionsdrivers/serial/8250.c
- drivers/serial/8250_early.c 59 additions, 58 deletionsdrivers/serial/8250_early.c
- drivers/serial/Kconfig 14 additions, 0 deletionsdrivers/serial/Kconfig
- include/asm-i386/fixmap.h 2 additions, 0 deletionsinclude/asm-i386/fixmap.h
- include/asm-i386/io.h 1 addition, 0 deletionsinclude/asm-i386/io.h
- include/asm-x86_64/fixmap.h 3 additions, 1 deletioninclude/asm-x86_64/fixmap.h
- include/asm-x86_64/io.h 1 addition, 0 deletionsinclude/asm-x86_64/io.h
- include/linux/console.h 2 additions, 0 deletionsinclude/linux/console.h
- include/linux/serial.h 0 additions, 6 deletionsinclude/linux/serial.h
- include/linux/serial_8250.h 4 additions, 0 deletionsinclude/linux/serial_8250.h
- init/main.c 4 additions, 1 deletioninit/main.c
- kernel/printk.c 22 additions, 0 deletionskernel/printk.c
Loading
Please register or sign in to comment