summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-06-23 19:23:30 +0200
committerPatrick Rudolph <siro@das-labor.org>2019-06-28 07:36:03 +0000
commitefc39cbec787b9447669c29e664e9ac74c476783 (patch)
tree3efa050bf8db7fc64577d59c89b887591b1dd1df /src/mainboard
parent7be4f30c5a0ae2177423c38235fd6b4c11c83f82 (diff)
downloadcoreboot-efc39cbec787b9447669c29e664e9ac74c476783.tar.xz
mb/emulation/qemu-riscv: Use generic 8250 uart driver
Drop hacked uart code and use the generic 8250 uart driver for ns16550a. Tested on qemu-system-riscv64: * The UART is still working. Change-Id: I6efda913fa39e0cfa466b52c570572aca90dacdf Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33735 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Philipp Hug <philipp@hug.cx> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/emulation/qemu-riscv/Kconfig2
-rw-r--r--src/mainboard/emulation/qemu-riscv/uart.c35
2 files changed, 2 insertions, 35 deletions
diff --git a/src/mainboard/emulation/qemu-riscv/Kconfig b/src/mainboard/emulation/qemu-riscv/Kconfig
index d15c99e966..f0f658d0d9 100644
--- a/src/mainboard/emulation/qemu-riscv/Kconfig
+++ b/src/mainboard/emulation/qemu-riscv/Kconfig
@@ -37,9 +37,9 @@ config BOARD_SPECIFIC_OPTIONS
def_bool y
select SOC_UCB_RISCV
select BOARD_ROMSIZE_KB_4096
- select HAVE_UART_SPECIAL
select BOOT_DEVICE_NOT_SPI_FLASH
select MISSING_BOARD_RESET
+ select DRIVERS_UART_8250MEM
config MAINBOARD_DIR
string
diff --git a/src/mainboard/emulation/qemu-riscv/uart.c b/src/mainboard/emulation/qemu-riscv/uart.c
index 021713a40a..271e994493 100644
--- a/src/mainboard/emulation/qemu-riscv/uart.c
+++ b/src/mainboard/emulation/qemu-riscv/uart.c
@@ -15,42 +15,9 @@
#include <types.h>
#include <console/uart.h>
-#include <boot/coreboot_tables.h>
#include <mainboard/addressmap.h>
-static uint8_t *buf = (void *)QEMU_VIRT_UART0;
uintptr_t uart_platform_base(int idx)
{
- return (uintptr_t) buf;
+ return (uintptr_t) QEMU_VIRT_UART0;
}
-
-void uart_init(int idx)
-{
-}
-
-unsigned char uart_rx_byte(int idx)
-{
- return *buf;
-}
-
-void uart_tx_byte(int idx, unsigned char data)
-{
- *buf = data;
-}
-
-void uart_tx_flush(int idx)
-{
-}
-
-#ifndef __PRE_RAM__
-void uart_fill_lb(void *data)
-{
- struct lb_serial serial;
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = QEMU_VIRT_UART0;
- serial.baud = 115200;
- serial.regwidth = 1;
- lb_add_serial(&serial, data);
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
-}
-#endif