From patchwork Thu Apr 14 21:46:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: console/console.h cleanup Date: Thu, 14 Apr 2011 21:46:16 -0000 From: Stefan Reinauer X-Patchwork-Id: 2874 Message-Id: <20110414214615.GA16484@coreboot.org> To: coreboot@coreboot.org See patch Acked-by: Peter Stuge - include usbdebug.c where appropriate - don't do ne2k_transmit()s without actual output Signed-off-by: Stefan Reinauer Index: src/include/console/console.h =================================================================== --- src/include/console/console.h (revision 6491) +++ src/include/console/console.h (working copy) @@ -158,6 +158,9 @@ #if CONFIG_CONSOLE_SERIAL8250 #include "lib/uart8250.c" #endif +#if CONFIG_USBDEBUG +#include "lib/usbdebug.c" +#endif #if CONFIG_CONSOLE_NE2K #include "lib/ne2k.c" #endif @@ -167,6 +170,9 @@ #if CONFIG_CONSOLE_SERIAL8250 uart8250_tx_byte(CONFIG_TTYS0_BASE, byte); #endif +#if CONFIG_USBDEBUG + usbdebug_tx_byte(byte); +#endif #if CONFIG_CONSOLE_NE2K ne2k_append_data_byte(byte, CONFIG_CONSOLE_NE2K_IO_PORT); #endif @@ -188,6 +194,9 @@ #if CONFIG_CONSOLE_SERIAL8250 uart8250_tx_byte(CONFIG_TTYS0_BASE, byte); #endif +#if CONFIG_USBDEBUG + usbdebug_tx_byte(byte); +#endif #if CONFIG_CONSOLE_NE2K ne2k_append_data_byte(byte, CONFIG_CONSOLE_NE2K_IO_PORT); ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT); @@ -200,10 +209,10 @@ if (console_loglevel >= loglevel) { __console_tx_nibble((value >> 4U) & 0x0fU); __console_tx_nibble(value & 0x0fU); - } #if CONFIG_CONSOLE_NE2K ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT); #endif + } } static void __console_tx_hex16(int loglevel, unsigned short value) @@ -213,10 +222,10 @@ __console_tx_nibble((value >> 8U) & 0x0fU); __console_tx_nibble((value >> 4U) & 0x0fU); __console_tx_nibble(value & 0x0fU); - } #if CONFIG_CONSOLE_NE2K ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT); #endif + } } static void __console_tx_hex32(int loglevel, unsigned int value) @@ -230,10 +239,10 @@ __console_tx_nibble((value >> 8U) & 0x0fU); __console_tx_nibble((value >> 4U) & 0x0fU); __console_tx_nibble(value & 0x0fU); - } #if CONFIG_CONSOLE_NE2K ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT); #endif + } } static void __console_tx_string(int loglevel, const char *str)