summaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
Diffstat (limited to 'src/console')
-rw-r--r--src/console/Kconfig7
-rw-r--r--src/console/Makefile.inc2
-rw-r--r--src/console/console.c4
3 files changed, 11 insertions, 2 deletions
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 117fdb890a..b1f41de12b 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -5,6 +5,13 @@ config SERIAL_CONSOLE
help
Send coreboot debug output to a serial port
+config EARLY_SERIAL_CONSOLE
+ bool
+ depends on SERIAL_CONSOLE
+ default n
+ help
+ Use serial console during early (pre-RAM) boot stages
+
config CONSOLE_SERIAL8250
bool "Serial port console output (I/O mapped, 8250-compatible)"
depends on SERIAL_CONSOLE
diff --git a/src/console/Makefile.inc b/src/console/Makefile.inc
index a712486f53..3c4777fbef 100644
--- a/src/console/Makefile.inc
+++ b/src/console/Makefile.inc
@@ -10,7 +10,7 @@ smm-y += vtxprintf.c
smm-$(CONFIG_SMM_TSEG) += die.c
romstage-y += vtxprintf.c
-romstage-$(CONFIG_CACHE_AS_RAM) += console.c
+romstage-$(CONFIG_EARLY_SERIAL_CONSOLE) += console.c
romstage-y += post.c
romstage-y += die.c
diff --git a/src/console/console.c b/src/console/console.c
index d5f25a5fee..ad8f217fe8 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -99,13 +99,15 @@ int console_tst_byte(void)
#else // __PRE_RAM__ ^^^ NOT defined vvv defined
+#include <uart.h>
+
void console_init(void)
{
#if CONFIG_USBDEBUG
enable_usbdebug(CONFIG_USBDEBUG_DEFAULT_PORT);
early_usbdebug_init();
#endif
-#if CONFIG_CONSOLE_SERIAL8250
+#if CONFIG_HAVE_UART_IO_MAPPED || CONFIG_HAVE_UART_MEMORY_MAPPED
uart_init();
#endif
#if CONFIG_DRIVERS_OXFORD_OXPCIE && CONFIG_CONSOLE_SERIAL8250MEM