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 static void uartmem_tx_byte(unsigned char data)
36 uart8250_mem_tx_byte(uart_bar, data);
39 static unsigned char uartmem_rx_byte(void)
44 return uart8250_mem_rx_byte(uart_bar);
47 static int uartmem_tst_byte(void)
52 return uart8250_mem_can_rx_byte(uart_bar);
55 static const struct console_driver uart8250mem_console __console = {
57 .tx_byte = uartmem_tx_byte,
58 .rx_byte = uartmem_rx_byte,
59 .tst_byte = uartmem_tst_byte,