summaryrefslogtreecommitdiff
path: root/src/include/console
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coreboot.org>2010-12-17 00:08:21 +0000
committerStefan Reinauer <stepan@openbios.org>2010-12-17 00:08:21 +0000
commit85b0fa1ace685bfdb1f1febbbf5127710a314888 (patch)
tree11fac9795931c6cdca6a785301d9294e4ba9dcae /src/include/console
parentefbfd501fee8decd0942808a47a3f9e93d30ae38 (diff)
downloadcoreboot-85b0fa1ace685bfdb1f1febbbf5127710a314888.tar.xz
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
Diffstat (limited to 'src/include/console')
-rw-r--r--src/include/console/console.h17
1 files changed, 11 insertions, 6 deletions
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 <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
}
}