summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/emulation/spike-riscv/Kconfig2
-rw-r--r--src/mainboard/emulation/spike-riscv/uart.c34
2 files changed, 2 insertions, 34 deletions
diff --git a/src/mainboard/emulation/spike-riscv/Kconfig b/src/mainboard/emulation/spike-riscv/Kconfig
index 7c7fb346a4..b7290e3e3d 100644
--- a/src/mainboard/emulation/spike-riscv/Kconfig
+++ b/src/mainboard/emulation/spike-riscv/Kconfig
@@ -22,7 +22,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select SOC_UCB_RISCV
select BOARD_ROMSIZE_KB_4096
select ARCH_BOOTBLOCK_RISCV
- select HAVE_UART_SPECIAL
+ select DRIVERS_UART_8250MEM
config MAINBOARD_DIR
string
diff --git a/src/mainboard/emulation/spike-riscv/uart.c b/src/mainboard/emulation/spike-riscv/uart.c
index 5983131489..8513849f05 100644
--- a/src/mainboard/emulation/spike-riscv/uart.c
+++ b/src/mainboard/emulation/spike-riscv/uart.c
@@ -19,39 +19,7 @@
#include <boot/coreboot_tables.h>
#include <spike_util.h>
-static uint8_t *buf = (void *)0x3f8;
uintptr_t uart_platform_base(int idx)
{
- return (uintptr_t) buf;
+ return (uintptr_t) 0x40001000;
}
-
-void uart_init(int idx)
-{
-}
-
-unsigned char uart_rx_byte(int idx)
-{
- return *buf; // this does not work on spike, requires more implementation details
-}
-
-void uart_tx_byte(int idx, unsigned char data)
-{
- mcall_console_putchar(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 = 0x3f8;
- serial.baud = 115200;
- serial.regwidth = 1;
- lb_add_serial(&serial, data);
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
-}
-#endif