2 * This file is part of the coreboot project.
4 * Copyright (C) 2003 Eric Biederman
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <console/console.h>
22 #include <pc80/mc146818rtc.h>
24 static u32 uart_bar = 0;
26 static void uartmem_init(void)
28 uart_bar = uart_mem_init();
31 u32 uartmem_getbaseaddr(void)
36 static void uartmem_tx_byte(unsigned char data)
41 uart8250_mem_tx_byte(uart_bar, data);
44 static void uartmem_tx_flush(void)
46 uart8250_mem_tx_flush(uart_bar);
49 static unsigned char uartmem_rx_byte(void)
54 return uart8250_mem_rx_byte(uart_bar);
57 static int uartmem_tst_byte(void)
62 return uart8250_mem_can_rx_byte(uart_bar);
65 static const struct console_driver uart8250mem_console __console = {
67 .tx_byte = uartmem_tx_byte,
68 .tx_flush = uartmem_tx_flush,
69 .rx_byte = uartmem_rx_byte,
70 .tst_byte = uartmem_tst_byte,