Skip to content

Commit

Permalink
Kconfig: remove useless SERIAL_UARTLITE
Browse files Browse the repository at this point in the history
Uartlite has its own config items and init entry. There is no need to keep the config item in device "serial", which is acutally ns16550.
  • Loading branch information
cebarobot committed May 20, 2024
1 parent 69c8017 commit 05c2020
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion configs/riscv64-xs-spmem-ref_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ CONFIG_HAS_SERIAL=y
CONFIG_SERIAL_PORT=0x3f8
CONFIG_SERIAL_MMIO=0xa10003f8
# CONFIG_SERIAL_INPUT_FIFO is not set
# CONFIG_SERIAL_UARTLITE is not set
CONFIG_HAS_TIMER=y
CONFIG_RTC_PORT=0x48
CONFIG_RTC_MMIO=0xa1000048
Expand Down
3 changes: 0 additions & 3 deletions src/device/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ config SERIAL_INPUT_FIFO
bool "Enable input FIFO with /tmp/nemu.serial"
default n

config SERIAL_UARTLITE
bool "Use uartlite as the serial (default: 16550)"
default n
endif # HAS_SERIAL

menuconfig HAS_UARTLITE
Expand Down
9 changes: 0 additions & 9 deletions src/device/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ static void serial_io_handler(uint32_t offset, int len, bool is_write) {
}

void init_serial() {
#ifdef CONFIG_SERIAL_UARTLITE
void init_uartlite();
init_uartlite();
void init_uart_snps();
init_uart_snps();
// to avoid unused-function warning
(void)serial_io_handler;
#else
printf("init_serial\n");
serial_base = new_space(8);
add_pio_map ("serial", CONFIG_SERIAL_PORT, serial_base, 8, serial_io_handler);
Expand All @@ -150,5 +142,4 @@ void init_serial() {
init_fifo();
preset_input();
#endif
#endif // CONFIG_SERIAL_UARTLITE
}

0 comments on commit 05c2020

Please sign in to comment.