uart: Redefine Kconfig options
Option DRIVERS_UART builds with support for UART hardware. Option CONSOLE_SERIAL enables the console output for UART. Those x86 boards that do not have serial port on SuperIO should select NO_UART_ON_SUPERIO to disable 8250 UART for the default configuration. Removes: CONSOLE_SERIAL_UART HAVE_UART_IO_MAPPED HAVE_UART_MEMORY_MAPPED Renames: CONSOLE_SERIAL8250 -> DRIVERS_UART_8250IO CONSOLE_SERIAL8250MEM -> DRIVERS_UART_8250MEM Change-Id: Id3afa05f85c0d6849746886db8b6c2ed6c846b61 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5311 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
parent
bbf6f3d384
commit
afa7b13b93
|
@ -28,7 +28,7 @@ void console_tx_byte(unsigned char byte)
|
||||||
if (byte == '\n')
|
if (byte == '\n')
|
||||||
console_tx_byte('\r');
|
console_tx_byte('\r');
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_SERIAL_UART
|
#if CONFIG_CONSOLE_SERIAL
|
||||||
uart_tx_byte(byte);
|
uart_tx_byte(byte);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_CONSOLE_CBMEM && !defined(__BOOT_BLOCK__)
|
#if CONFIG_CONSOLE_CBMEM && !defined(__BOOT_BLOCK__)
|
||||||
|
@ -38,7 +38,7 @@ void console_tx_byte(unsigned char byte)
|
||||||
|
|
||||||
static void _console_tx_flush(void)
|
static void _console_tx_flush(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_CONSOLE_SERIAL_UART
|
#if CONFIG_CONSOLE_SERIAL
|
||||||
uart_tx_flush();
|
uart_tx_flush();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
*/
|
*/
|
||||||
#define console_loglevel CONFIG_DEFAULT_CONSOLE_LOGLEVEL
|
#define console_loglevel CONFIG_DEFAULT_CONSOLE_LOGLEVEL
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
#if CONFIG_CONSOLE_SERIAL && CONFIG_DRIVERS_UART_8250IO
|
||||||
#include "drivers/uart/util.c"
|
#include "drivers/uart/util.c"
|
||||||
#include "drivers/uart/uart8250io.c"
|
#include "drivers/uart/uart8250io.c"
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
static void __console_tx_byte(unsigned char byte)
|
static void __console_tx_byte(unsigned char byte)
|
||||||
{
|
{
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
#if CONFIG_CONSOLE_SERIAL
|
||||||
uart_tx_byte(byte);
|
uart_tx_byte(byte);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_CONSOLE_NE2K
|
#if CONFIG_CONSOLE_NE2K
|
||||||
|
@ -61,7 +61,7 @@ static void __console_tx_nibble(unsigned nibble)
|
||||||
static void __console_tx_char(int loglevel, unsigned char byte)
|
static void __console_tx_char(int loglevel, unsigned char byte)
|
||||||
{
|
{
|
||||||
if (console_loglevel >= loglevel) {
|
if (console_loglevel >= loglevel) {
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
#if CONFIG_CONSOLE_SERIAL
|
||||||
uart_tx_byte(byte);
|
uart_tx_byte(byte);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_CONSOLE_NE2K
|
#if CONFIG_CONSOLE_NE2K
|
||||||
|
|
|
@ -31,10 +31,7 @@ void console_tx_byte(unsigned char byte)
|
||||||
if (byte == '\n')
|
if (byte == '\n')
|
||||||
console_tx_byte('\r');
|
console_tx_byte('\r');
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250MEM
|
#if CONFIG_CONSOLE_SERIAL
|
||||||
uart_tx_byte(byte);
|
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
|
||||||
uart_tx_byte(byte);
|
uart_tx_byte(byte);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_CONSOLE_USB && (CONFIG_USBDEBUG_IN_ROMSTAGE || !defined(__PRE_RAM__))
|
#if CONFIG_CONSOLE_USB && (CONFIG_USBDEBUG_IN_ROMSTAGE || !defined(__PRE_RAM__))
|
||||||
|
@ -53,10 +50,7 @@ void console_tx_byte(unsigned char byte)
|
||||||
|
|
||||||
void console_tx_flush(void)
|
void console_tx_flush(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_CONSOLE_SERIAL8250MEM
|
#if CONFIG_CONSOLE_SERIAL
|
||||||
uart_tx_flush();
|
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
|
||||||
uart_tx_flush();
|
uart_tx_flush();
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_CONSOLE_NE2K
|
#if CONFIG_CONSOLE_NE2K
|
||||||
|
|
|
@ -29,37 +29,29 @@ config SQUELCH_EARLY_SMP
|
||||||
config CONSOLE_SERIAL
|
config CONSOLE_SERIAL
|
||||||
bool "Serial port console output"
|
bool "Serial port console output"
|
||||||
default y
|
default y
|
||||||
|
depends on DRIVERS_UART_8250IO || DRIVERS_UART_8250MEM || HAVE_UART_SPECIAL
|
||||||
help
|
help
|
||||||
Send coreboot debug output to a serial port (should be one or more of
|
Send coreboot debug output to a serial port.
|
||||||
CONSOLE_SERIAL8250, CONSOLE_SERIAL8250MEM, CONSOLE_SERIAL_UART)
|
|
||||||
|
|
||||||
config CONSOLE_SERIAL8250
|
The type of serial port driver selected based on your configuration is
|
||||||
bool "Serial port console output (I/O mapped, 8250-compatible)"
|
shown on the following menu line. Supporting multiple different types
|
||||||
depends on CONSOLE_SERIAL
|
of UARTs in one build is not supported.
|
||||||
depends on HAVE_UART_IO_MAPPED
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Send coreboot debug output to an I/O mapped serial port console.
|
|
||||||
|
|
||||||
config CONSOLE_SERIAL8250MEM
|
if CONSOLE_SERIAL
|
||||||
bool "Serial port console output (memory mapped, 8250-compatible)"
|
|
||||||
depends on CONSOLE_SERIAL
|
|
||||||
depends on HAVE_UART_MEMORY_MAPPED
|
|
||||||
help
|
|
||||||
Send coreboot debug output to a memory mapped serial port console.
|
|
||||||
|
|
||||||
config CONSOLE_SERIAL_UART
|
comment "I/O mapped, 8250-compatible"
|
||||||
bool "Serial port console output (device-specific UART)"
|
depends on DRIVERS_UART_8250IO
|
||||||
depends on CONSOLE_SERIAL
|
|
||||||
|
comment "memory mapped, 8250-compatible"
|
||||||
|
depends on DRIVERS_UART_8250MEM
|
||||||
|
|
||||||
|
comment "device-specific UART"
|
||||||
depends on HAVE_UART_SPECIAL
|
depends on HAVE_UART_SPECIAL
|
||||||
default y
|
|
||||||
help
|
|
||||||
Send coreboot debug output to a device-specific serial port console.
|
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Serial port for 8250"
|
prompt "Serial port for 8250"
|
||||||
default CONSOLE_SERIAL_COM1
|
default CONSOLE_SERIAL_COM1
|
||||||
depends on CONSOLE_SERIAL8250
|
depends on DRIVERS_UART_8250IO
|
||||||
|
|
||||||
config CONSOLE_SERIAL_COM1
|
config CONSOLE_SERIAL_COM1
|
||||||
bool "COM1/ttyS0, I/O port 0x3f8"
|
bool "COM1/ttyS0, I/O port 0x3f8"
|
||||||
|
@ -82,7 +74,7 @@ endchoice
|
||||||
|
|
||||||
config TTYS0_BASE
|
config TTYS0_BASE
|
||||||
hex
|
hex
|
||||||
depends on CONSOLE_SERIAL8250
|
depends on DRIVERS_UART_8250IO
|
||||||
default 0x3f8 if CONSOLE_SERIAL_COM1
|
default 0x3f8 if CONSOLE_SERIAL_COM1
|
||||||
default 0x2f8 if CONSOLE_SERIAL_COM2
|
default 0x2f8 if CONSOLE_SERIAL_COM2
|
||||||
default 0x3e8 if CONSOLE_SERIAL_COM3
|
default 0x3e8 if CONSOLE_SERIAL_COM3
|
||||||
|
@ -93,7 +85,6 @@ config TTYS0_BASE
|
||||||
choice
|
choice
|
||||||
prompt "Baud rate"
|
prompt "Baud rate"
|
||||||
default CONSOLE_SERIAL_115200
|
default CONSOLE_SERIAL_115200
|
||||||
depends on CONSOLE_SERIAL
|
|
||||||
|
|
||||||
config CONSOLE_SERIAL_115200
|
config CONSOLE_SERIAL_115200
|
||||||
bool "115200"
|
bool "115200"
|
||||||
|
@ -133,7 +124,9 @@ config TTYS0_BAUD
|
||||||
config TTYS0_LCS
|
config TTYS0_LCS
|
||||||
int
|
int
|
||||||
default 3
|
default 3
|
||||||
depends on CONSOLE_SERIAL8250 || CONSOLE_SERIAL8250MEM
|
depends on DRIVERS_UART_8250IO || DRIVERS_UART_8250MEM
|
||||||
|
|
||||||
|
endif # CONSOLE_SERIAL
|
||||||
|
|
||||||
config SPKMODEM
|
config SPKMODEM
|
||||||
bool "spkmodem (console on speaker) console output"
|
bool "spkmodem (console on speaker) console output"
|
||||||
|
|
|
@ -43,7 +43,7 @@ static unsigned char uartmem_rx_byte(void)
|
||||||
/* This only relevant with x86 with GDB_STUB enabled.*/
|
/* This only relevant with x86 with GDB_STUB enabled.*/
|
||||||
static int uartmem_tst_byte(void)
|
static int uartmem_tst_byte(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM
|
#if CONFIG_DRIVERS_UART_8250IO || CONFIG_DRIVERS_UART_8250MEM
|
||||||
return uart_can_rx_byte();
|
return uart_can_rx_byte();
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -76,7 +76,7 @@ config SYS_SDRAM_BASE
|
||||||
choice CONSOLE_SERIAL_UART_CHOICES
|
choice CONSOLE_SERIAL_UART_CHOICES
|
||||||
prompt "Serial Console UART"
|
prompt "Serial Console UART"
|
||||||
default CONSOLE_SERIAL_UART0
|
default CONSOLE_SERIAL_UART0
|
||||||
depends on CONSOLE_SERIAL_UART
|
depends on CONSOLE_SERIAL
|
||||||
|
|
||||||
config CONSOLE_SERIAL_UART0
|
config CONSOLE_SERIAL_UART0
|
||||||
bool "UART0"
|
bool "UART0"
|
||||||
|
|
|
@ -4,8 +4,6 @@ bootblock-y += gpio.c
|
||||||
bootblock-y += pinmux.c
|
bootblock-y += pinmux.c
|
||||||
bootblock-y += raminit.c
|
bootblock-y += raminit.c
|
||||||
bootblock-y += timer.c
|
bootblock-y += timer.c
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
|
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart_console.c
|
|
||||||
|
|
||||||
romstage-y += bootblock_media.c
|
romstage-y += bootblock_media.c
|
||||||
romstage-y += cbmem.c
|
romstage-y += cbmem.c
|
||||||
|
@ -13,8 +11,6 @@ romstage-y += clock.c
|
||||||
romstage-y += pinmux.c
|
romstage-y += pinmux.c
|
||||||
romstage-y += timer.c
|
romstage-y += timer.c
|
||||||
romstage-y += twi.c
|
romstage-y += twi.c
|
||||||
romstage-y += uart.c
|
|
||||||
romstage-y += uart_console.c
|
|
||||||
|
|
||||||
ramstage-y += bootblock_media.c
|
ramstage-y += bootblock_media.c
|
||||||
ramstage-y += cbmem.c
|
ramstage-y += cbmem.c
|
||||||
|
@ -23,8 +19,12 @@ ramstage-y += cpu.c
|
||||||
ramstage-y += monotonic_timer.c
|
ramstage-y += monotonic_timer.c
|
||||||
ramstage-y += timer.c
|
ramstage-y += timer.c
|
||||||
ramstage-y += twi.c
|
ramstage-y += twi.c
|
||||||
ramstage-y += uart.c
|
|
||||||
ramstage-y += uart_console.c
|
ifeq ($(CONFIG_DRIVERS_UART),y)
|
||||||
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c uart_console.c
|
||||||
|
romstage-y += uart.c uart_console.c
|
||||||
|
ramstage-y += uart.c uart_console.c
|
||||||
|
endif
|
||||||
|
|
||||||
real-target: $(obj)/BOOT0
|
real-target: $(obj)/BOOT0
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ config SYS_SDRAM_BASE
|
||||||
choice CONSOLE_SERIAL_UART_CHOICES
|
choice CONSOLE_SERIAL_UART_CHOICES
|
||||||
prompt "Serial Console UART"
|
prompt "Serial Console UART"
|
||||||
default CONSOLE_SERIAL_UART3
|
default CONSOLE_SERIAL_UART3
|
||||||
depends on CONSOLE_SERIAL_UART
|
depends on CONSOLE_SERIAL
|
||||||
|
|
||||||
config CONSOLE_SERIAL_UART0
|
config CONSOLE_SERIAL_UART0
|
||||||
bool "UART0"
|
bool "UART0"
|
||||||
|
@ -117,7 +117,7 @@ endchoice
|
||||||
|
|
||||||
config CONSOLE_SERIAL_UART_ADDRESS
|
config CONSOLE_SERIAL_UART_ADDRESS
|
||||||
hex
|
hex
|
||||||
depends on CONSOLE_SERIAL_UART
|
depends on CONSOLE_SERIAL
|
||||||
default 0x12c00000 if CONSOLE_SERIAL_UART0
|
default 0x12c00000 if CONSOLE_SERIAL_UART0
|
||||||
default 0x12c10000 if CONSOLE_SERIAL_UART1
|
default 0x12c10000 if CONSOLE_SERIAL_UART1
|
||||||
default 0x12c20000 if CONSOLE_SERIAL_UART2
|
default 0x12c20000 if CONSOLE_SERIAL_UART2
|
||||||
|
|
|
@ -9,7 +9,7 @@ bootblock-y += pinmux.c mct.c power.c
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock_init.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock_init.c
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock.c
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += monotonic_timer.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += monotonic_timer.c
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
|
ifeq ($(CONFIG_DRIVERS_UART),y)
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
|
||||||
endif
|
endif
|
||||||
bootblock-y += wakeup.c
|
bootblock-y += wakeup.c
|
||||||
|
@ -25,7 +25,7 @@ romstage-y += dmc_init_ddr3.c
|
||||||
romstage-y += power.c
|
romstage-y += power.c
|
||||||
romstage-y += mct.c
|
romstage-y += mct.c
|
||||||
romstage-y += monotonic_timer.c
|
romstage-y += monotonic_timer.c
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
|
ifeq ($(CONFIG_DRIVERS_UART),y)
|
||||||
romstage-$(CONFIG_EARLY_CONSOLE) += uart.c
|
romstage-$(CONFIG_EARLY_CONSOLE) += uart.c
|
||||||
endif
|
endif
|
||||||
romstage-y += wakeup.c
|
romstage-y += wakeup.c
|
||||||
|
@ -40,7 +40,7 @@ ramstage-y += clock.c
|
||||||
ramstage-y += clock_init.c
|
ramstage-y += clock_init.c
|
||||||
ramstage-y += pinmux.c
|
ramstage-y += pinmux.c
|
||||||
ramstage-y += power.c
|
ramstage-y += power.c
|
||||||
ramstage-$(CONFIG_CONSOLE_SERIAL_UART) += uart.c
|
ramstage-$(CONFIG_DRIVERS_UART) += uart.c
|
||||||
ramstage-y += cpu.c
|
ramstage-y += cpu.c
|
||||||
ramstage-y += tmu.c
|
ramstage-y += tmu.c
|
||||||
ramstage-y += mct.c
|
ramstage-y += mct.c
|
||||||
|
|
|
@ -93,7 +93,7 @@ config SYS_SDRAM_BASE
|
||||||
choice CONSOLE_SERIAL_UART_CHOICES
|
choice CONSOLE_SERIAL_UART_CHOICES
|
||||||
prompt "Serial Console UART"
|
prompt "Serial Console UART"
|
||||||
default CONSOLE_SERIAL_UART3
|
default CONSOLE_SERIAL_UART3
|
||||||
depends on CONSOLE_SERIAL_UART
|
depends on CONSOLE_SERIAL
|
||||||
|
|
||||||
config CONSOLE_SERIAL_UART0
|
config CONSOLE_SERIAL_UART0
|
||||||
bool "UART0"
|
bool "UART0"
|
||||||
|
@ -119,7 +119,7 @@ endchoice
|
||||||
|
|
||||||
config CONSOLE_SERIAL_UART_ADDRESS
|
config CONSOLE_SERIAL_UART_ADDRESS
|
||||||
hex
|
hex
|
||||||
depends on CONSOLE_SERIAL_UART
|
depends on CONSOLE_SERIAL
|
||||||
default 0x12c00000 if CONSOLE_SERIAL_UART0
|
default 0x12c00000 if CONSOLE_SERIAL_UART0
|
||||||
default 0x12c10000 if CONSOLE_SERIAL_UART1
|
default 0x12c10000 if CONSOLE_SERIAL_UART1
|
||||||
default 0x12c20000 if CONSOLE_SERIAL_UART2
|
default 0x12c20000 if CONSOLE_SERIAL_UART2
|
||||||
|
|
|
@ -9,7 +9,7 @@ bootblock-y += pinmux.c mct.c power.c
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock_init.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock_init.c
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock.c
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += monotonic_timer.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += monotonic_timer.c
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
|
ifeq ($(CONFIG_DRIVERS_UART),y)
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
|
||||||
endif
|
endif
|
||||||
bootblock-y += wakeup.c
|
bootblock-y += wakeup.c
|
||||||
|
@ -25,7 +25,7 @@ romstage-y += dmc_init_ddr3.c
|
||||||
romstage-y += power.c
|
romstage-y += power.c
|
||||||
romstage-y += mct.c
|
romstage-y += mct.c
|
||||||
romstage-y += monotonic_timer.c
|
romstage-y += monotonic_timer.c
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
|
ifeq ($(CONFIG_DRIVERS_UART),y)
|
||||||
romstage-$(CONFIG_EARLY_CONSOLE) += uart.c
|
romstage-$(CONFIG_EARLY_CONSOLE) += uart.c
|
||||||
endif
|
endif
|
||||||
romstage-y += wakeup.c
|
romstage-y += wakeup.c
|
||||||
|
@ -40,7 +40,7 @@ ramstage-y += clock.c
|
||||||
ramstage-y += clock_init.c
|
ramstage-y += clock_init.c
|
||||||
ramstage-y += pinmux.c
|
ramstage-y += pinmux.c
|
||||||
ramstage-y += power.c
|
ramstage-y += power.c
|
||||||
ramstage-$(CONFIG_CONSOLE_SERIAL_UART) += uart.c
|
ramstage-$(CONFIG_DRIVERS_UART) += uart.c
|
||||||
ramstage-y += cpu.c
|
ramstage-y += cpu.c
|
||||||
ramstage-y += tmu.c
|
ramstage-y += tmu.c
|
||||||
ramstage-y += mct.c
|
ramstage-y += mct.c
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
bootblock-y += dmtimer.c
|
bootblock-y += dmtimer.c
|
||||||
bootblock-y += bootblock_media.c
|
bootblock-y += bootblock_media.c
|
||||||
bootblock-y += pinmux.c
|
bootblock-y += pinmux.c
|
||||||
bootblock-$(CONFIG_EARLY_CONSOLE) += uart.c
|
|
||||||
|
|
||||||
romstage-y += nand.c
|
romstage-y += nand.c
|
||||||
romstage-y += uart.c
|
|
||||||
|
|
||||||
ramstage-y += dmtimer.c
|
ramstage-y += dmtimer.c
|
||||||
ramstage-y += monotonic_timer.c
|
ramstage-y += monotonic_timer.c
|
||||||
ramstage-y += nand.c
|
ramstage-y += nand.c
|
||||||
ramstage-y += timer.c
|
ramstage-y += timer.c
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DRIVERS_UART),y)
|
||||||
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
|
||||||
|
romstage-y += uart.c
|
||||||
ramstage-y += uart.c
|
ramstage-y += uart.c
|
||||||
|
endif
|
||||||
|
|
||||||
$(call add-class,omap-header)
|
$(call add-class,omap-header)
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,7 @@ void console_tx_byte(unsigned char byte)
|
||||||
if (byte == '\n')
|
if (byte == '\n')
|
||||||
console_tx_byte('\r');
|
console_tx_byte('\r');
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250MEM
|
#if CONFIG_CONSOLE_SERIAL
|
||||||
uart_tx_byte(byte);
|
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
|
||||||
uart_tx_byte(byte);
|
uart_tx_byte(byte);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -45,10 +42,7 @@ void console_init(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_DEBUG_SMI
|
#if CONFIG_DEBUG_SMI
|
||||||
console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
|
console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
#if CONFIG_CONSOLE_SERIAL
|
||||||
uart_init();
|
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250MEM
|
|
||||||
uart_init();
|
uart_init();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,7 +30,7 @@ subdirs-y += parade
|
||||||
subdirs-y += realtek
|
subdirs-y += realtek
|
||||||
subdirs-y += sil
|
subdirs-y += sil
|
||||||
subdirs-y += trident
|
subdirs-y += trident
|
||||||
subdirs-y += uart
|
subdirs-$(CONFIG_DRIVERS_UART) += uart
|
||||||
subdirs-y += usb
|
subdirs-y += usb
|
||||||
subdirs-y += ics
|
subdirs-y += ics
|
||||||
subdirs-y += spi
|
subdirs-y += spi
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
config DRIVERS_OXFORD_OXPCIE
|
config DRIVERS_OXFORD_OXPCIE
|
||||||
bool "Oxford OXPCIe952"
|
bool "Oxford OXPCIe952"
|
||||||
default n
|
default n
|
||||||
select HAVE_UART_MEMORY_MAPPED
|
select DRIVERS_UART_8250MEM
|
||||||
help
|
help
|
||||||
Support for Oxford OXPCIe952 serial port PCIe cards.
|
Support for Oxford OXPCIe952 serial port PCIe cards.
|
||||||
Currently only devices with the vendor ID 0x1415 and device ID
|
Currently only devices with the vendor ID 0x1415 and device ID
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL8250MEM),y)
|
ifeq ($(CONFIG_CONSOLE_SERIAL),y)
|
||||||
ramstage-y += oxpcie_early.c oxpcie.c
|
ramstage-y += oxpcie_early.c oxpcie.c
|
||||||
romstage-y += oxpcie_early.c
|
romstage-y += oxpcie_early.c
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,10 +1,19 @@
|
||||||
# This should default to N and be set by SuperI/O drivers that have an UART
|
config DRIVERS_UART
|
||||||
config HAVE_UART_IO_MAPPED
|
|
||||||
bool
|
bool
|
||||||
|
default y if CONSOLE_SERIAL
|
||||||
|
default n
|
||||||
|
|
||||||
|
config DRIVERS_UART_8250IO
|
||||||
|
bool "Serial port on SuperIO"
|
||||||
depends on !ARCH_ARMV7
|
depends on !ARCH_ARMV7
|
||||||
|
default n if NO_UART_ON_SUPERIO
|
||||||
default y if ARCH_X86
|
default y if ARCH_X86
|
||||||
|
|
||||||
config HAVE_UART_MEMORY_MAPPED
|
# Select this for mainboard without SuperIO serial port.
|
||||||
|
config NO_UART_ON_SUPERIO
|
||||||
|
def_bool n
|
||||||
|
|
||||||
|
config DRIVERS_UART_8250MEM
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,25 @@
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL),y)
|
|
||||||
romstage-y += util.c
|
romstage-y += util.c
|
||||||
ramstage-y += util.c
|
ramstage-y += util.c
|
||||||
bootblock-y += util.c
|
bootblock-y += util.c
|
||||||
smm-$(CONFIG_DEBUG_SMI) += util.c
|
smm-$(CONFIG_DEBUG_SMI) += util.c
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL8250),y)
|
# Add the driver, only one can be enabled. The driver files may
|
||||||
|
# be located in the soc/ or cpu/ directories instead of here.
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DRIVERS_UART_8250IO),y)
|
||||||
romstage-y += uart8250io.c
|
romstage-y += uart8250io.c
|
||||||
ramstage-y += uart8250io.c
|
ramstage-y += uart8250io.c
|
||||||
smm-$(CONFIG_DEBUG_SMI) += uart8250io.c
|
smm-$(CONFIG_DEBUG_SMI) += uart8250io.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL8250MEM),y)
|
ifeq ($(CONFIG_DRIVERS_UART_8250MEM),y)
|
||||||
romstage-y += uart8250mem.c
|
romstage-y += uart8250mem.c
|
||||||
ramstage-y += uart8250mem.c
|
ramstage-y += uart8250mem.c
|
||||||
smm-$(CONFIG_DEBUG_SMI) += uart8250mem.c
|
smm-$(CONFIG_DEBUG_SMI) += uart8250mem.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_DRIVERS_UART_PL011),y)
|
ifeq ($(CONFIG_DRIVERS_UART_PL011),y)
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += pl011.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += pl011.c
|
||||||
romstage-$(CONFIG_EARLY_CONSOLE) += pl011.c
|
romstage-$(CONFIG_EARLY_CONSOLE) += pl011.c
|
||||||
ramstage-y += pl011.c
|
ramstage-y += pl011.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
|
@ -390,7 +390,7 @@ unsigned long write_coreboot_table(
|
||||||
lb_mainboard(head);
|
lb_mainboard(head);
|
||||||
|
|
||||||
/* Record the serial ports and consoles */
|
/* Record the serial ports and consoles */
|
||||||
#if CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM || CONFIG_CONSOLE_SERIAL_UART
|
#if CONFIG_CONSOLE_SERIAL
|
||||||
uart_fill_lb(head);
|
uart_fill_lb(head);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_CONSOLE_USB
|
#if CONFIG_CONSOLE_USB
|
||||||
|
|
|
@ -50,7 +50,7 @@ config DRAM_SIZE_MB
|
||||||
|
|
||||||
config CONSOLE_SERIAL_UART_ADDRESS
|
config CONSOLE_SERIAL_UART_ADDRESS
|
||||||
hex
|
hex
|
||||||
depends on CONSOLE_SERIAL_UART
|
depends on CONSOLE_SERIAL
|
||||||
default 0x10009000
|
default 0x10009000
|
||||||
|
|
||||||
# Memory map for qemu vexpress-a9:
|
# Memory map for qemu vexpress-a9:
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
#include "option_table.h"
|
#include "option_table.h"
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
#if CONFIG_DRIVERS_UART_8250IO
|
||||||
#include "superio/smsc/lpc47n207/lpc47n207.h"
|
#include "superio/smsc/lpc47n207/lpc47n207.h"
|
||||||
#include "superio/smsc/lpc47n207/early_serial.c"
|
#include "superio/smsc/lpc47n207/early_serial.c"
|
||||||
#endif
|
#endif
|
||||||
|
@ -53,7 +53,7 @@ static void pch_enable_lpc(void)
|
||||||
/* Set COM1/COM2 decode range */
|
/* Set COM1/COM2 decode range */
|
||||||
pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
|
pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
#if CONFIG_DRIVERS_UART_8250IO
|
||||||
/* Enable SuperIO + EC + KBC + COM1 + lpc47n207 config*/
|
/* Enable SuperIO + EC + KBC + COM1 + lpc47n207 config*/
|
||||||
pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN |
|
pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN |
|
||||||
KBC_LPC_EN | CNF2_LPC_EN | COMA_LPC_EN);
|
KBC_LPC_EN | CNF2_LPC_EN | COMA_LPC_EN);
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include <cpu/x86/bist.h>
|
#include <cpu/x86/bist.h>
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
#if CONFIG_DRIVERS_UART_8250IO
|
||||||
#include "superio/smsc/lpc47n207/lpc47n207.h"
|
#include "superio/smsc/lpc47n207/lpc47n207.h"
|
||||||
#include "superio/smsc/lpc47n207/early_serial.c"
|
#include "superio/smsc/lpc47n207/early_serial.c"
|
||||||
#endif
|
#endif
|
||||||
|
@ -62,7 +62,7 @@ static void pch_enable_lpc(void)
|
||||||
/* Set COM1/COM2 decode range */
|
/* Set COM1/COM2 decode range */
|
||||||
pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
|
pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
#if CONFIG_DRIVERS_UART_8250IO
|
||||||
/* Enable SuperIO + PS/2 Keyboard/Mouse + COM1 + lpc47n207 config*/
|
/* Enable SuperIO + PS/2 Keyboard/Mouse + COM1 + lpc47n207 config*/
|
||||||
pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | KBC_LPC_EN |\
|
pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | KBC_LPC_EN |\
|
||||||
CNF2_LPC_EN | COMA_LPC_EN);
|
CNF2_LPC_EN | COMA_LPC_EN);
|
||||||
|
|
|
@ -64,7 +64,7 @@ config CBFS_HEADER_ROM_OFFSET
|
||||||
choice CONSOLE_SERIAL_UART_CHOICES
|
choice CONSOLE_SERIAL_UART_CHOICES
|
||||||
prompt "Serial Console UART"
|
prompt "Serial Console UART"
|
||||||
default CONSOLE_SERIAL_UART0
|
default CONSOLE_SERIAL_UART0
|
||||||
depends on CONSOLE_SERIAL_UART
|
depends on CONSOLE_SERIAL
|
||||||
|
|
||||||
config CONSOLE_SERIAL_UART0
|
config CONSOLE_SERIAL_UART0
|
||||||
bool "UART0"
|
bool "UART0"
|
||||||
|
@ -100,7 +100,7 @@ endchoice
|
||||||
|
|
||||||
config CONSOLE_SERIAL_UART_ADDRESS
|
config CONSOLE_SERIAL_UART_ADDRESS
|
||||||
hex
|
hex
|
||||||
depends on CONSOLE_SERIAL_UART
|
depends on CONSOLE_SERIAL
|
||||||
default 0x44e09000 if CONSOLE_SERIAL_UART0
|
default 0x44e09000 if CONSOLE_SERIAL_UART0
|
||||||
default 0x48022000 if CONSOLE_SERIAL_UART1
|
default 0x48022000 if CONSOLE_SERIAL_UART1
|
||||||
default 0x48024000 if CONSOLE_SERIAL_UART2
|
default 0x48024000 if CONSOLE_SERIAL_UART2
|
||||||
|
|
|
@ -117,7 +117,7 @@ static void vt1211_pnp_set_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_SERIAL8250
|
#if CONFIG_CONSOLE_SERIAL && CONFIG_DRIVERS_UART_8250IO
|
||||||
/* TODO: Do the same for SP2? */
|
/* TODO: Do the same for SP2? */
|
||||||
if (dev->path.pnp.device == VT1211_SP1) {
|
if (dev->path.pnp.device == VT1211_SP1) {
|
||||||
for (res = dev->resource_list; res; res = res->next) {
|
for (res = dev->resource_list; res; res = res->next) {
|
||||||
|
|
Loading…
Reference in New Issue