usbdebug: Unify console API

Struct dbgp_pipe would not be suitable for use with xHCI.
Just use an index, it is easy to setup in Kconfig if our
future debug setup has separate pipes for console
output and debugging/traceings.

Change-Id: Icbbd28f03113b208016f80217ab801d598d443a8
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5227
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
Kyösti Mälkki
2014-02-10 00:00:44 +02:00
parent 902626c23c
commit ea6736a2d0
5 changed files with 41 additions and 21 deletions

View File

@@ -49,7 +49,7 @@ void console_tx_byte(unsigned char byte)
uart8250_tx_byte(CONFIG_TTYS0_BASE, byte);
#endif
#if CONFIG_USBDEBUG && (CONFIG_USBDEBUG_IN_ROMSTAGE || !defined(__PRE_RAM__))
usbdebug_tx_byte(dbgp_console_output(), byte);
usb_tx_byte(0, byte);
#endif
#if CONFIG_CONSOLE_NE2K
ne2k_append_data(&byte, 1, CONFIG_CONSOLE_NE2K_IO_PORT);
@@ -74,7 +74,7 @@ void console_tx_flush(void)
ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT);
#endif
#if CONFIG_USBDEBUG && (CONFIG_USBDEBUG_IN_ROMSTAGE || !defined(__PRE_RAM__))
usbdebug_tx_flush(dbgp_console_output());
usb_tx_flush(0);
#endif
}