diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-02-15 10:19:23 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-03-04 15:28:41 +0100 |
commit | 2b95da01e6bbdd8b001fa1ff2830dbaa70f14c3e (patch) | |
tree | d4dabf55577b4f01c133a94f506360e79286a777 /src/console/uart8250mem_console.c | |
parent | 4770749edca1e54c9a04b48ca6909d786139fa1b (diff) | |
download | coreboot-2b95da01e6bbdd8b001fa1ff2830dbaa70f14c3e.tar.xz |
uart8250mem: Unify calls with generic UART
NOTE: UART base for SMM continues to be broken, as it does not use
the address resource allocator has assigned.
Change-Id: I79f2ca8427a33a3c719adfe277c24dab79a33ef3
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5235
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/console/uart8250mem_console.c')
-rw-r--r-- | src/console/uart8250mem_console.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/console/uart8250mem_console.c b/src/console/uart8250mem_console.c index eb4e0e0b7e..7e52aed273 100644 --- a/src/console/uart8250mem_console.c +++ b/src/console/uart8250mem_console.c @@ -19,47 +19,30 @@ #include <console/console.h> #include <console/uart.h> -#include <uart8250.h> -static u32 uart_bar = 0; - -void uartmem_init(void) -{ - uart_bar = uart_mem_init(); -} - -u32 uartmem_getbaseaddr(void) +static void uartmem_init(void) { - return uart_bar; + uart_init(); } static void uartmem_tx_byte(unsigned char data) { - if (!uart_bar) - return; - - uart8250_mem_tx_byte(uart_bar, data); + uart_tx_byte(data); } static void uartmem_tx_flush(void) { - uart8250_mem_tx_flush(uart_bar); + uart_tx_flush(); } static unsigned char uartmem_rx_byte(void) { - if (!uart_bar) - return 0; - - return uart8250_mem_rx_byte(uart_bar); + return uart_rx_byte(); } static int uartmem_tst_byte(void) { - if (!uart_bar) - return 0; - - return uart8250_mem_can_rx_byte(uart_bar); + return uart_can_rx_byte(); } static const struct console_driver uart8250mem_console __console = { |