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

@ -29,22 +29,22 @@ static void dbgp_init(void)
static void dbgp_tx_byte(unsigned char data)
{
usbdebug_tx_byte(dbgp_console_output(), data);
usb_tx_byte(0, data);
}
static unsigned char dbgp_rx_byte(void)
{
return usbdebug_rx_byte(dbgp_console_input());
return usb_rx_byte(0);
}
static void dbgp_tx_flush(void)
{
usbdebug_tx_flush(dbgp_console_output());
usb_tx_flush(0);
}
static int dbgp_tst_byte(void)
{
return dbgp_ep_is_active(dbgp_console_input());
return usb_can_rx_byte(0);
}
static const struct console_driver usbdebug_direct_console __console = {