From 82704c63b98202fe2a24032697369cd190202d3f Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Thu, 26 Jul 2012 14:31:40 +0200 Subject: USBDEBUG: buffer up to 8 bytes EHCI debug allows to send message with 8 bytes length, but we're only sending one byte in each transaction. Buffer up to 8 bytes to speed up debug output. Change-Id: I9dbb406833c4966c3afbd610e1b13a8fa3d62f39 Signed-off-by: Sven Schnelle Reviewed-on: http://review.coreboot.org/1357 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/console/usbdebug_console.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/console') diff --git a/src/console/usbdebug_console.c b/src/console/usbdebug_console.c index a624b9dd21..58a62b8e94 100644 --- a/src/console/usbdebug_console.c +++ b/src/console/usbdebug_console.c @@ -55,8 +55,7 @@ static void dbgp_init(void) static void dbgp_tx_byte(unsigned char data) { - if (dbg_info.ehci_debug) - dbgp_bulk_write_x(&dbg_info, (char*)&data, 1); + usbdebug_tx_byte(&dbg_info, data); } static unsigned char dbgp_rx_byte(void) @@ -69,6 +68,11 @@ static unsigned char dbgp_rx_byte(void) return data; } +static void dbgp_tx_flush(void) +{ + usbdebug_tx_flush(&dbg_info); +} + static int dbgp_tst_byte(void) { return (int)dbg_info.ehci_debug; @@ -77,6 +81,7 @@ static int dbgp_tst_byte(void) static const struct console_driver usbdebug_direct_console __console = { .init = dbgp_init, .tx_byte = dbgp_tx_byte, + .tx_flush = dbgp_tx_flush, .rx_byte = dbgp_rx_byte, .tst_byte = dbgp_tst_byte, }; -- cgit v1.2.3