summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Makefile.inc2
-rw-r--r--src/drivers/oxford/oxpcie/Kconfig2
-rw-r--r--src/drivers/oxford/oxpcie/Makefile.inc2
-rw-r--r--src/drivers/uart/Kconfig15
-rw-r--r--src/drivers/uart/Makefile.inc13
5 files changed, 20 insertions, 14 deletions
diff --git a/src/drivers/Makefile.inc b/src/drivers/Makefile.inc
index 197a900b05..148e257b5d 100644
--- a/src/drivers/Makefile.inc
+++ b/src/drivers/Makefile.inc
@@ -30,7 +30,7 @@ subdirs-y += parade
subdirs-y += realtek
subdirs-y += sil
subdirs-y += trident
-subdirs-y += uart
+subdirs-$(CONFIG_DRIVERS_UART) += uart
subdirs-y += usb
subdirs-y += ics
subdirs-y += spi
diff --git a/src/drivers/oxford/oxpcie/Kconfig b/src/drivers/oxford/oxpcie/Kconfig
index 899a1533b7..5ad42aafb7 100644
--- a/src/drivers/oxford/oxpcie/Kconfig
+++ b/src/drivers/oxford/oxpcie/Kconfig
@@ -1,7 +1,7 @@
config DRIVERS_OXFORD_OXPCIE
bool "Oxford OXPCIe952"
default n
- select HAVE_UART_MEMORY_MAPPED
+ select DRIVERS_UART_8250MEM
help
Support for Oxford OXPCIe952 serial port PCIe cards.
Currently only devices with the vendor ID 0x1415 and device ID
diff --git a/src/drivers/oxford/oxpcie/Makefile.inc b/src/drivers/oxford/oxpcie/Makefile.inc
index 1922425fd9..5e3e6e5728 100644
--- a/src/drivers/oxford/oxpcie/Makefile.inc
+++ b/src/drivers/oxford/oxpcie/Makefile.inc
@@ -1,4 +1,4 @@
-ifeq ($(CONFIG_CONSOLE_SERIAL8250MEM),y)
+ifeq ($(CONFIG_CONSOLE_SERIAL),y)
ramstage-y += oxpcie_early.c oxpcie.c
romstage-y += oxpcie_early.c
endif
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