drop one more version of doing serial uart output differently.

coreboot made it kind of complicated to print a character on serial. Not quite
as complicated as UEFI, but too much for a good design. Fix it.

Signed-off-by: Stefan Reinauer <stepan@coreboot.org>
Acked-by: Stefan Reinauer <stepan@coreboot.org>




git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6191 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer
2010-12-17 00:08:21 +00:00
committed by Stefan Reinauer
parent efbfd501fe
commit 85b0fa1ace
17 changed files with 248 additions and 231 deletions

View File

@ -148,8 +148,9 @@ int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf,
#define print_spew_hex32(HEX) printk(BIOS_SPEW, "%08x", (HEX))
#else
#include <pc80/serial.c>
#if CONFIG_CONSOLE_SERIAL8250
#include "lib/uart8259.c"
#endif
#if CONFIG_CONSOLE_NE2K
#include "lib/ne2k.c"
#endif
@ -157,7 +158,9 @@ int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf,
/* __ROMCC__ */
static void __console_tx_byte(unsigned char byte)
{
uart_tx_byte(byte);
#if CONFIG_CONSOLE_SERIAL8250
uart8250_tx_byte(CONFIG_TTYS0_BASE, byte);
#endif
#if CONFIG_CONSOLE_NE2K
ne2k_append_data_byte(byte, CONFIG_CONSOLE_NE2K_IO_PORT);
#endif
@ -176,10 +179,12 @@ static void __console_tx_nibble(unsigned nibble)
static void __console_tx_char(int loglevel, unsigned char byte)
{
if (console_loglevel >= loglevel) {
uart_tx_byte(byte);
#if CONFIG_CONSOLE_SERIAL8250
uart8250_tx_byte(CONFIG_TTYS0_BASE, byte);
#endif
#if CONFIG_CONSOLE_NE2K
ne2k_append_data_byte(byte, CONFIG_CONSOLE_NE2K_IO_PORT);
ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT);
ne2k_append_data_byte(byte, CONFIG_CONSOLE_NE2K_IO_PORT);
ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT);
#endif
}
}