summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/console/Kconfig5
-rw-r--r--src/console/console.c2
-rw-r--r--src/lib/Makefile.inc2
-rw-r--r--src/lib/usbdebug.c2
-rw-r--r--src/southbridge/amd/agesa/hudson/Makefile.inc2
-rw-r--r--src/southbridge/amd/cimx/sb700/Makefile.inc2
-rw-r--r--src/southbridge/amd/cimx/sb800/Makefile.inc2
-rw-r--r--src/southbridge/amd/sb600/Makefile.inc2
-rw-r--r--src/southbridge/amd/sb700/Makefile.inc2
-rw-r--r--src/southbridge/amd/sb800/Makefile.inc2
-rw-r--r--src/southbridge/intel/common/Makefile.inc2
-rw-r--r--src/southbridge/nvidia/ck804/Makefile.inc2
-rw-r--r--src/southbridge/nvidia/mcp55/Makefile.inc2
-rw-r--r--src/southbridge/sis/sis966/Makefile.inc2
14 files changed, 18 insertions, 13 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
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 6110b88124..b0d9366113 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -49,11 +49,11 @@ romstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
romstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
romstage-$(CONFIG_CONSOLE_NE2K) += ne2k.c
romstage-$(CONFIG_SPKMODEM) += spkmodem.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += usbdebug.c
ifeq ($(CONFIG_EARLY_CBMEM_INIT),y)
romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
romstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
-romstage-$(CONFIG_USBDEBUG) += usbdebug.c
endif
romstage-y += compute_ip_checksum.c
diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c
index e5f7902ae3..885599b1a6 100644
--- a/src/lib/usbdebug.c
+++ b/src/lib/usbdebug.c
@@ -581,7 +581,7 @@ err:
static void enable_usbdebug(void)
{
-#if defined(__PRE_RAM__) || !(CONFIG_EARLY_CONSOLE && CONFIG_EARLY_CBMEM_INIT)
+#if defined(__PRE_RAM__) || !CONFIG_USBDEBUG_IN_ROMSTAGE
pci_devfn_t dbg_dev = pci_ehci_dbg_dev(CONFIG_USBDEBUG_HCD_INDEX);
pci_ehci_dbg_enable(dbg_dev, CONFIG_EHCI_BAR);
#endif
diff --git a/src/southbridge/amd/agesa/hudson/Makefile.inc b/src/southbridge/amd/agesa/hudson/Makefile.inc
index 44e030cf9a..d50d09ebef 100644
--- a/src/southbridge/amd/agesa/hudson/Makefile.inc
+++ b/src/southbridge/amd/agesa/hudson/Makefile.inc
@@ -12,7 +12,7 @@ ramstage-y += sd.c
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
ramstage-y += reset.c
-romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
romstage-y += early_setup.c
diff --git a/src/southbridge/amd/cimx/sb700/Makefile.inc b/src/southbridge/amd/cimx/sb700/Makefile.inc
index f6f0d866a4..ff96ca6a53 100644
--- a/src/southbridge/amd/cimx/sb700/Makefile.inc
+++ b/src/southbridge/amd/cimx/sb700/Makefile.inc
@@ -30,5 +30,5 @@ ramstage-y += reset.c
ramstage-y += smbus.c
ramstage-y += lpc.c
-romstage-$(CONFIG_USBDEBUG) += ../../sb700/enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += ../../sb700/enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += ../../sb700/enable_usbdebug.c
diff --git a/src/southbridge/amd/cimx/sb800/Makefile.inc b/src/southbridge/amd/cimx/sb800/Makefile.inc
index 0ff9e1ed1b..2ed50967a9 100644
--- a/src/southbridge/amd/cimx/sb800/Makefile.inc
+++ b/src/southbridge/amd/cimx/sb800/Makefile.inc
@@ -34,7 +34,7 @@ ramstage-$(CONFIG_SB800_IMC_FAN_CONTROL) += fan.c
ramstage-$(CONFIG_HAVE_ACPI_RESUME) += spi.c
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
-romstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += ../../sb800/enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
ramstage-y += smbus.c
diff --git a/src/southbridge/amd/sb600/Makefile.inc b/src/southbridge/amd/sb600/Makefile.inc
index d0df57c670..37fe57df1a 100644
--- a/src/southbridge/amd/sb600/Makefile.inc
+++ b/src/southbridge/amd/sb600/Makefile.inc
@@ -8,5 +8,5 @@ ramstage-y += hda.c
ramstage-y += ac97.c
ramstage-y += pci.c
ramstage-y += reset.c
-romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
diff --git a/src/southbridge/amd/sb700/Makefile.inc b/src/southbridge/amd/sb700/Makefile.inc
index b457e4a9af..677aaad1f7 100644
--- a/src/southbridge/amd/sb700/Makefile.inc
+++ b/src/southbridge/amd/sb700/Makefile.inc
@@ -10,7 +10,7 @@ ramstage-y += pci.c
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
romstage-y += reset.c
ramstage-y += reset.c
-romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
romstage-y += early_setup.c
diff --git a/src/southbridge/amd/sb800/Makefile.inc b/src/southbridge/amd/sb800/Makefile.inc
index 1253b39419..db75d3f0fa 100644
--- a/src/southbridge/amd/sb800/Makefile.inc
+++ b/src/southbridge/amd/sb800/Makefile.inc
@@ -9,5 +9,5 @@ ramstage-y += pci.c
ramstage-y += pcie.c
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
ramstage-y += reset.c
-romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
diff --git a/src/southbridge/intel/common/Makefile.inc b/src/southbridge/intel/common/Makefile.inc
index 91b6380646..4374ebcb43 100644
--- a/src/southbridge/intel/common/Makefile.inc
+++ b/src/southbridge/intel/common/Makefile.inc
@@ -17,5 +17,5 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
-romstage-$(CONFIG_USBDEBUG) += usb_debug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += usb_debug.c
ramstage-$(CONFIG_USBDEBUG) += usb_debug.c
diff --git a/src/southbridge/nvidia/ck804/Makefile.inc b/src/southbridge/nvidia/ck804/Makefile.inc
index 0e57f2078e..b249f7e9d3 100644
--- a/src/southbridge/nvidia/ck804/Makefile.inc
+++ b/src/southbridge/nvidia/ck804/Makefile.inc
@@ -15,7 +15,7 @@ ramstage-y += reset.c
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
-romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
romstage-y += early_smbus.c
diff --git a/src/southbridge/nvidia/mcp55/Makefile.inc b/src/southbridge/nvidia/mcp55/Makefile.inc
index e11fc78a7f..29ad438c72 100644
--- a/src/southbridge/nvidia/mcp55/Makefile.inc
+++ b/src/southbridge/nvidia/mcp55/Makefile.inc
@@ -15,7 +15,7 @@ ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
ramstage-y += reset.c
-romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
chipset_bootblock_inc += $(src)/southbridge/nvidia/mcp55/romstrap.inc
diff --git a/src/southbridge/sis/sis966/Makefile.inc b/src/southbridge/sis/sis966/Makefile.inc
index 15559739b5..1a9ea65429 100644
--- a/src/southbridge/sis/sis966/Makefile.inc
+++ b/src/southbridge/sis/sis966/Makefile.inc
@@ -10,7 +10,7 @@ ramstage-y += pcie.c
ramstage-y += aza.c
ramstage-y += reset.c
-romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
chipset_bootblock_inc += $(src)/southbridge/sis/sis966/romstrap.inc