summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Kconfig2
-rw-r--r--src/arch/x86/lib/romstage_console.c6
-rw-r--r--src/console/Kconfig1
-rw-r--r--src/console/console.c4
-rw-r--r--src/include/timestamp.h2
-rw-r--r--src/lib/usbdebug.c6
6 files changed, 9 insertions, 12 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 4af80027cd..10f8c185fe 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -190,7 +190,7 @@ config DYNAMIC_CBMEM
config COLLECT_TIMESTAMPS
bool "Create a table of timestamps collected during boot"
- depends on (EARLY_CBMEM_INIT || DYNAMIC_CBMEM)
+ default n
help
Make coreboot create a table of timer-ID/timer-value pairs to
allow measuring time spent at different phases of the boot process.
diff --git a/src/arch/x86/lib/romstage_console.c b/src/arch/x86/lib/romstage_console.c
index 1c3141ccb8..fc90085ccd 100644
--- a/src/arch/x86/lib/romstage_console.c
+++ b/src/arch/x86/lib/romstage_console.c
@@ -49,13 +49,13 @@ void console_tx_byte(unsigned char byte)
#if CONFIG_CONSOLE_SERIAL8250
uart8250_tx_byte(CONFIG_TTYS0_BASE, byte);
#endif
-#if CONFIG_USBDEBUG
+#if CONFIG_USBDEBUG && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__))
usbdebug_tx_byte(dbgp_console_output(), byte);
#endif
#if CONFIG_CONSOLE_NE2K
ne2k_append_data(&byte, 1, CONFIG_CONSOLE_NE2K_IO_PORT);
#endif
-#if CONFIG_CONSOLE_CBMEM
+#if CONFIG_CONSOLE_CBMEM && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__))
cbmemc_tx_byte(byte);
#endif
#if CONFIG_SPKMODEM
@@ -74,7 +74,7 @@ void console_tx_flush(void)
#if CONFIG_CONSOLE_NE2K
ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT);
#endif
-#if CONFIG_USBDEBUG
+#if CONFIG_USBDEBUG && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__))
usbdebug_tx_flush(dbgp_console_output());
#endif
}
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 9bfb6e9446..f415d93c39 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -274,7 +274,6 @@ config CONSOLE_NE2K_IO_PORT
boundary, qemu needs broader align)
config CONSOLE_CBMEM
- depends on (EARLY_CBMEM_INIT || DYNAMIC_CBMEM)
bool "Send console output to a CBMEM buffer"
default n
help
diff --git a/src/console/console.c b/src/console/console.c
index 06a460428b..014a4f73c3 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -113,13 +113,13 @@ void console_init(void)
#if CONFIG_CONSOLE_NE2K
ne2k_init(CONFIG_CONSOLE_NE2K_IO_PORT);
#endif
-#if CONFIG_CONSOLE_CBMEM && !defined(__BOOT_BLOCK__)
+#if CONFIG_CONSOLE_CBMEM && CONFIG_EARLY_CBMEM_INIT && !defined(__BOOT_BLOCK__)
cbmemc_init();
#endif
#if CONFIG_SPKMODEM
spkmodem_init();
#endif
-#if CONFIG_USBDEBUG && !defined(__BOOT_BLOCK__)
+#if CONFIG_USBDEBUG && CONFIG_EARLY_CBMEM_INIT && !defined(__BOOT_BLOCK__)
usbdebug_init();
#endif
diff --git a/src/include/timestamp.h b/src/include/timestamp.h
index edc0076c1c..9e780c3ecb 100644
--- a/src/include/timestamp.h
+++ b/src/include/timestamp.h
@@ -54,7 +54,7 @@ enum timestamp_id {
TS_SELFBOOT_JUMP = 99,
};
-#if CONFIG_COLLECT_TIMESTAMPS
+#if CONFIG_COLLECT_TIMESTAMPS && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__))
#include <cpu/x86/tsc.h>
void timestamp_init(tsc_t base);
void timestamp_add(enum timestamp_id id, tsc_t ts_time);
diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c
index 3faec10f63..e5f7902ae3 100644
--- a/src/lib/usbdebug.c
+++ b/src/lib/usbdebug.c
@@ -579,13 +579,13 @@ err:
}
#endif /* CONFIG_USBDEBUG_OPTIONAL_HUB_PORT */
-#if defined(__PRE_RAM__) || !CONFIG_EARLY_CONSOLE
static void enable_usbdebug(void)
{
+#if defined(__PRE_RAM__) || !(CONFIG_EARLY_CONSOLE && CONFIG_EARLY_CBMEM_INIT)
pci_devfn_t dbg_dev = pci_ehci_dbg_dev(CONFIG_USBDEBUG_HCD_INDEX);
pci_ehci_dbg_enable(dbg_dev, CONFIG_EHCI_BAR);
-}
#endif
+}
static void set_debug_port(unsigned int port)
{
@@ -1038,8 +1038,6 @@ int usbdebug_init(void)
if (!get_usbdebug_from_cbmem(dbg_info))
return 0;
#endif
-#if defined(__PRE_RAM__) || !CONFIG_EARLY_CONSOLE
enable_usbdebug();
-#endif
return usbdebug_init_(CONFIG_EHCI_BAR, CONFIG_EHCI_DEBUG_OFFSET, dbg_info);
}