summaryrefslogtreecommitdiff
path: root/src/lib/usbdebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/usbdebug.c')
-rw-r--r--src/lib/usbdebug.c6
1 files changed, 2 insertions, 4 deletions
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);
}