aboutsummaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
Diffstat (limited to 'src/console')
-rw-r--r--src/console/Makefile.inc9
-rw-r--r--src/console/console.c6
2 files changed, 8 insertions, 7 deletions
diff --git a/src/console/Makefile.inc b/src/console/Makefile.inc
index 8e6037a4c2..9499180d4d 100644
--- a/src/console/Makefile.inc
+++ b/src/console/Makefile.inc
@@ -9,14 +9,13 @@ smm-y += printk.c
smm-y += vtxprintf.c
smm-$(CONFIG_SMM_TSEG) += die.c
-romstage-y += vtxprintf.c
-romstage-$(CONFIG_EARLY_CONSOLE) += console.c
+romstage-$(CONFIG_EARLY_CONSOLE) += vtxprintf.c
+romstage-y += console.c
romstage-y += post.c
romstage-y += die.c
-# TODO Add vtxprintf.c only when early console is required.
-bootblock-y += vtxprintf.c
-bootblock-$(CONFIG_EARLY_CONSOLE) += console.c
+bootblock-$(CONFIG_EARLY_CONSOLE) += vtxprintf.c
+bootblock-y += console.c
bootblock-y += die.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250_console.c
diff --git a/src/console/console.c b/src/console/console.c
index d4b4b8834a..aec711b5f8 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -99,10 +99,10 @@ int console_tst_byte(void)
#else // __PRE_RAM__ ^^^ NOT defined vvv defined
-#include <uart.h>
-
void console_init(void)
{
+#if CONFIG_EARLY_CONSOLE
+
#if CONFIG_USBDEBUG
enable_usbdebug(CONFIG_USBDEBUG_DEFAULT_PORT);
early_usbdebug_init();
@@ -127,5 +127,7 @@ void console_init(void)
COREBOOT_BUILD
" starting...\n";
print_info(console_test);
+
+#endif /* CONFIG_EARLY_CONSOLE */
}
#endif