Nico Huber (nico.h@gmx.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4694
-gerrit
commit 1c6ec400f468bb5baed633e54988384f6b6783d3 Author: Nico Huber nico.h@gmx.de Date: Tue Jan 14 19:26:02 2014 +0100
usbdebug: Export ehci_bar as parameter to usbdebug_init()
Let the caller of usbdebug_init() decide where the EHCI MMIO space is mapped. This makes it easier to use our usbdebug code in other contexts, say Linux userspace.
Change-Id: I059d8432f654e6b55d5940d45a8fe1df27c2e51e Signed-off-by: Nico Huber nico.h@gmx.de --- src/console/console.c | 2 +- src/console/usbdebug_console.c | 2 +- src/include/usbdebug.h | 2 +- src/lib/usbdebug.c | 4 ++-- src/northbridge/intel/sandybridge/raminit.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/console/console.c b/src/console/console.c index a31e293..3d7d5c9 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -122,7 +122,7 @@ void console_init(void) spkmodem_init(); #endif #if CONFIG_USBDEBUG_IN_ROMSTAGE && !defined(__BOOT_BLOCK__) - usbdebug_init(); + usbdebug_init(CONFIG_EHCI_BAR); #endif
static const char console_test[] = diff --git a/src/console/usbdebug_console.c b/src/console/usbdebug_console.c index 8df6417..5818d4e 100644 --- a/src/console/usbdebug_console.c +++ b/src/console/usbdebug_console.c @@ -24,7 +24,7 @@
static void dbgp_init(void) { - usbdebug_init(); + usbdebug_init(CONFIG_EHCI_BAR); }
static void dbgp_tx_byte(unsigned char data) diff --git a/src/include/usbdebug.h b/src/include/usbdebug.h index 926d658..74d7f5e 100644 --- a/src/include/usbdebug.h +++ b/src/include/usbdebug.h @@ -49,7 +49,7 @@ void pci_ehci_read_resources(struct device *dev);
struct dbgp_pipe;
-int usbdebug_init(void); +int usbdebug_init(unsigned ehci_bar);
struct dbgp_pipe *dbgp_console_output(void); struct dbgp_pipe *dbgp_console_input(void); diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c index 885599b..1147ef4 100644 --- a/src/lib/usbdebug.c +++ b/src/lib/usbdebug.c @@ -1030,7 +1030,7 @@ struct dbgp_pipe *dbgp_console_input(void) return &dbgp_ehci_info()->ep_pipe[DBGP_CONSOLE_EPIN]; }
-int usbdebug_init(void) +int usbdebug_init(unsigned ehci_bar) { struct ehci_debug_info *dbg_info = dbgp_ehci_info();
@@ -1039,5 +1039,5 @@ int usbdebug_init(void) return 0; #endif enable_usbdebug(); - return usbdebug_init_(CONFIG_EHCI_BAR, CONFIG_EHCI_DEBUG_OFFSET, dbg_info); + return usbdebug_init_(ehci_bar, CONFIG_EHCI_DEBUG_OFFSET, dbg_info); } diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c index b9c3839..d5d1075 100644 --- a/src/northbridge/intel/sandybridge/raminit.c +++ b/src/northbridge/intel/sandybridge/raminit.c @@ -275,7 +275,7 @@ void sdram_initialize(struct pei_data *pei_data)
#if CONFIG_USBDEBUG_IN_ROMSTAGE /* mrc.bin reconfigures USB, so reinit it to have debug */ - usbdebug_init(); + usbdebug_init(CONFIG_EHCI_BAR); #endif
/* For reference print the System Agent version