summaryrefslogtreecommitdiff
path: root/src/drivers/uart
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-02-13 17:16:22 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-04-09 11:24:43 +0200
commitafa7b13b9355b3df3da7606d434cb8b450316ab9 (patch)
tree6f6a712a477b2be52f353eb2e7db69c587914325 /src/drivers/uart
parentbbf6f3d384caf25efdfeca0fc5eaac13319a6a43 (diff)
downloadcoreboot-afa7b13b9355b3df3da7606d434cb8b450316ab9.tar.xz
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>
Diffstat (limited to 'src/drivers/uart')
-rw-r--r--src/drivers/uart/Kconfig15
-rw-r--r--src/drivers/uart/Makefile.inc13
2 files changed, 17 insertions, 11 deletions
diff --git a/src/drivers/uart/Kconfig b/src/drivers/uart/Kconfig
index 5c9a9d129c..889c69a0bc 100644
--- a/src/drivers/uart/Kconfig
+++ b/src/drivers/uart/Kconfig
@@ -1,10 +1,19 @@
-# This should default to N and be set by SuperI/O drivers that have an UART
-config HAVE_UART_IO_MAPPED
+config DRIVERS_UART
bool
+ default y if CONSOLE_SERIAL
+ default n
+
+config DRIVERS_UART_8250IO
+ bool "Serial port on SuperIO"
depends on !ARCH_ARMV7
+ default n if NO_UART_ON_SUPERIO
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
default n
diff --git a/src/drivers/uart/Makefile.inc b/src/drivers/uart/Makefile.inc
index 415c5bb095..286bff2112 100644
--- a/src/drivers/uart/Makefile.inc
+++ b/src/drivers/uart/Makefile.inc
@@ -1,28 +1,25 @@
-ifeq ($(CONFIG_CONSOLE_SERIAL),y)
romstage-y += util.c
ramstage-y += util.c
bootblock-y += 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
ramstage-y += uart8250io.c
smm-$(CONFIG_DEBUG_SMI) += uart8250io.c
endif
-ifeq ($(CONFIG_CONSOLE_SERIAL8250MEM),y)
+ifeq ($(CONFIG_DRIVERS_UART_8250MEM),y)
romstage-y += uart8250mem.c
ramstage-y += uart8250mem.c
smm-$(CONFIG_DEBUG_SMI) += uart8250mem.c
endif
-ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
-
ifeq ($(CONFIG_DRIVERS_UART_PL011),y)
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += pl011.c
romstage-$(CONFIG_EARLY_CONSOLE) += pl011.c
ramstage-y += pl011.c
endif
-
-endif