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:
Kyösti Mälkki
2014-02-13 17:16:22 +02:00
committed by Patrick Georgi
parent bbf6f3d384
commit afa7b13b93
24 changed files with 79 additions and 89 deletions

View File

@@ -76,7 +76,7 @@ config SYS_SDRAM_BASE
choice CONSOLE_SERIAL_UART_CHOICES
prompt "Serial Console UART"
default CONSOLE_SERIAL_UART0
depends on CONSOLE_SERIAL_UART
depends on CONSOLE_SERIAL
config CONSOLE_SERIAL_UART0
bool "UART0"

View File

@@ -4,8 +4,6 @@ bootblock-y += gpio.c
bootblock-y += pinmux.c
bootblock-y += raminit.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 += cbmem.c
@@ -13,8 +11,6 @@ romstage-y += clock.c
romstage-y += pinmux.c
romstage-y += timer.c
romstage-y += twi.c
romstage-y += uart.c
romstage-y += uart_console.c
ramstage-y += bootblock_media.c
ramstage-y += cbmem.c
@@ -23,8 +19,12 @@ ramstage-y += cpu.c
ramstage-y += monotonic_timer.c
ramstage-y += timer.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

View File

@@ -91,7 +91,7 @@ config SYS_SDRAM_BASE
choice CONSOLE_SERIAL_UART_CHOICES
prompt "Serial Console UART"
default CONSOLE_SERIAL_UART3
depends on CONSOLE_SERIAL_UART
depends on CONSOLE_SERIAL
config CONSOLE_SERIAL_UART0
bool "UART0"
@@ -117,7 +117,7 @@ endchoice
config CONSOLE_SERIAL_UART_ADDRESS
hex
depends on CONSOLE_SERIAL_UART
depends on CONSOLE_SERIAL
default 0x12c00000 if CONSOLE_SERIAL_UART0
default 0x12c10000 if CONSOLE_SERIAL_UART1
default 0x12c20000 if CONSOLE_SERIAL_UART2

View File

@@ -9,7 +9,7 @@ bootblock-y += pinmux.c mct.c power.c
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock_init.c
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock.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
endif
bootblock-y += wakeup.c
@@ -25,7 +25,7 @@ romstage-y += dmc_init_ddr3.c
romstage-y += power.c
romstage-y += mct.c
romstage-y += monotonic_timer.c
ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
ifeq ($(CONFIG_DRIVERS_UART),y)
romstage-$(CONFIG_EARLY_CONSOLE) += uart.c
endif
romstage-y += wakeup.c
@@ -40,7 +40,7 @@ ramstage-y += clock.c
ramstage-y += clock_init.c
ramstage-y += pinmux.c
ramstage-y += power.c
ramstage-$(CONFIG_CONSOLE_SERIAL_UART) += uart.c
ramstage-$(CONFIG_DRIVERS_UART) += uart.c
ramstage-y += cpu.c
ramstage-y += tmu.c
ramstage-y += mct.c

View File

@@ -93,7 +93,7 @@ config SYS_SDRAM_BASE
choice CONSOLE_SERIAL_UART_CHOICES
prompt "Serial Console UART"
default CONSOLE_SERIAL_UART3
depends on CONSOLE_SERIAL_UART
depends on CONSOLE_SERIAL
config CONSOLE_SERIAL_UART0
bool "UART0"
@@ -119,7 +119,7 @@ endchoice
config CONSOLE_SERIAL_UART_ADDRESS
hex
depends on CONSOLE_SERIAL_UART
depends on CONSOLE_SERIAL
default 0x12c00000 if CONSOLE_SERIAL_UART0
default 0x12c10000 if CONSOLE_SERIAL_UART1
default 0x12c20000 if CONSOLE_SERIAL_UART2

View File

@@ -9,7 +9,7 @@ bootblock-y += pinmux.c mct.c power.c
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock_init.c
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += clock.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
endif
bootblock-y += wakeup.c
@@ -25,7 +25,7 @@ romstage-y += dmc_init_ddr3.c
romstage-y += power.c
romstage-y += mct.c
romstage-y += monotonic_timer.c
ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
ifeq ($(CONFIG_DRIVERS_UART),y)
romstage-$(CONFIG_EARLY_CONSOLE) += uart.c
endif
romstage-y += wakeup.c
@@ -40,7 +40,7 @@ ramstage-y += clock.c
ramstage-y += clock_init.c
ramstage-y += pinmux.c
ramstage-y += power.c
ramstage-$(CONFIG_CONSOLE_SERIAL_UART) += uart.c
ramstage-$(CONFIG_DRIVERS_UART) += uart.c
ramstage-y += cpu.c
ramstage-y += tmu.c
ramstage-y += mct.c

View File

@@ -1,16 +1,19 @@
bootblock-y += dmtimer.c
bootblock-y += bootblock_media.c
bootblock-y += pinmux.c
bootblock-$(CONFIG_EARLY_CONSOLE) += uart.c
romstage-y += nand.c
romstage-y += uart.c
ramstage-y += dmtimer.c
ramstage-y += monotonic_timer.c
ramstage-y += nand.c
ramstage-y += timer.c
ifeq ($(CONFIG_DRIVERS_UART),y)
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
romstage-y += uart.c
ramstage-y += uart.c
endif
$(call add-class,omap-header)

View File

@@ -32,10 +32,7 @@ void console_tx_byte(unsigned char byte)
if (byte == '\n')
console_tx_byte('\r');
#if CONFIG_CONSOLE_SERIAL8250MEM
uart_tx_byte(byte);
#endif
#if CONFIG_CONSOLE_SERIAL8250
#if CONFIG_CONSOLE_SERIAL
uart_tx_byte(byte);
#endif
}
@@ -45,10 +42,7 @@ void console_init(void)
{
#if CONFIG_DEBUG_SMI
console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
#if CONFIG_CONSOLE_SERIAL8250
uart_init();
#endif
#if CONFIG_CONSOLE_SERIAL8250MEM
#if CONFIG_CONSOLE_SERIAL
uart_init();
#endif
#endif