summaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-10-11 21:14:59 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2013-10-22 21:35:05 +0200
commitac164057993e9edbfe78537efbbc9ef5f75cd67c (patch)
tree9a0de6d32cd779b6fc36a4a21c75e8e18b7b5bde /src/console
parent569ad760cc4d7e3595bd9d4f569d08b021a64663 (diff)
usbdebug: Fix boards without EARLY_CBMEM_INIT
The main usbdebug file lib/usbdebug.c was removed from romstage build with commit f8bf5a10 but the chipset-specific parts were not, leading to unresolved symbol errors for AMD platforms. Add a silent Kconfig variable USBDEBUG_IN_ROMSTAGE for convenient use of this feature. Change-Id: I0cd3fccf2612cf08497aa5c3750c89bf43ff69be Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3983 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/console')
-rw-r--r--src/console/Kconfig5
-rw-r--r--src/console/console.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/console/Kconfig b/src/console/Kconfig
index f415d93c39..d209325925 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -173,6 +173,11 @@ config USBDEBUG
If unsure, say N.
+config USBDEBUG_IN_ROMSTAGE
+ bool
+ default y if USBDEBUG && EARLY_CBMEM_INIT && EARLY_CONSOLE
+ default n
+
if USBDEBUG
config USBDEBUG_HCD_INDEX
diff --git a/src/console/console.c b/src/console/console.c
index 014a4f73c3..8a1c969987 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -119,7 +119,7 @@ void console_init(void)
#if CONFIG_SPKMODEM
spkmodem_init();
#endif
-#if CONFIG_USBDEBUG && CONFIG_EARLY_CBMEM_INIT && !defined(__BOOT_BLOCK__)
+#if CONFIG_USBDEBUG_IN_ROMSTAGE && !defined(__BOOT_BLOCK__)
usbdebug_init();
#endif