From 85b0fa1ace685bfdb1f1febbbf5127710a314888 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 17 Dec 2010 00:08:21 +0000 Subject: 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 Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6191 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/include/console/console.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/include/console') diff --git a/src/include/console/console.h b/src/include/console/console.h index 6953927ff1..026d4bdff3 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -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 - +#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 } } -- cgit v1.2.3