diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-10-30 09:57:35 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2011-10-31 04:06:10 +0100 |
commit | 20fc631ad2c483fd2bc12e56f3ca8a1572688fb5 (patch) | |
tree | 627cbfe2eccc644bec4019097481b6f136e55905 /src/lib | |
parent | 28f6a43755246641186f2c436b158d2dab4243a5 (diff) |
Fix usb debug dongle support
- move enable_usbdebug() declaration to usbdebug.h
- reinitialize debug driver in ramstage, as copying the data
structure from romstage doesn't work right now. This way of copying
data from romstage to ramstage is really board/cpu specific, and is
likely to break often. So don't do it.
Change-Id: I394678ded6679c1803e29eb691b926182bdcab68
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/355
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Makefile.inc | 1 | ||||
-rw-r--r-- | src/lib/usbdebug.c | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index b207ffed66..432e24e780 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -40,5 +40,6 @@ driver-$(CONFIG_CONSOLE_NE2K) += ne2k.c smm-y += memcpy.c cbfs.c memset.c memcmp.c smm-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c smm-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c +smm-$(CONFIG_USBDEBUG) += usbdebug.c $(obj)/lib/version.ramstage.o : $(obj)/build.h diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c index d022d2f345..6b75acf523 100644 --- a/src/lib/usbdebug.c +++ b/src/lib/usbdebug.c @@ -238,7 +238,6 @@ int dbgp_bulk_read_x(struct ehci_debug_info *dbg_info, void *data, int size) dbg_info->endpoint_in, data, size); } -#ifdef __PRE_RAM__ static void dbgp_mdelay(int ms) { int i; @@ -356,7 +355,7 @@ static int ehci_wait_for_port(struct ehci_regs *ehci_regs, int port) } -static int usbdebug_init(unsigned ehci_bar, unsigned offset, struct ehci_debug_info *info) +int usbdebug_init(unsigned ehci_bar, unsigned offset, struct ehci_debug_info *info) { struct ehci_caps *ehci_caps; struct ehci_regs *ehci_regs; @@ -566,8 +565,6 @@ next_debug_port: return -10; } -// **** This part is probably x86 specific and used by romstage.c **** // - int early_usbdebug_init(void) { struct ehci_debug_info *dbg_info = (struct ehci_debug_info *) @@ -588,4 +585,3 @@ void usbdebug_tx_byte(unsigned char data) dbgp_bulk_write_x(dbg_info, (char*)&data, 1); } } -#endif |