hw/riscv: Move sifive_uart model to hw/char

This is an effort to clean up the hw/riscv directory. Ideally it
should only contain the RISC-V SoC / machine codes plus generic
codes. Let's move sifive_uart model to hw/char directory.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <1599129623-68957-9-git-send-email-bmeng.cn@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
Bin Meng 2020-09-03 18:40:19 +08:00 committed by Alistair Francis
parent 70eb9f9cd1
commit b609b7e319
8 changed files with 9 additions and 4 deletions

View File

@ -58,3 +58,6 @@ config AVR_USART
config MCHP_PFSOC_MMUART config MCHP_PFSOC_MMUART
bool bool
config SIFIVE_UART
bool

View File

@ -30,6 +30,7 @@ softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_uart.c'))
softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_uart.c')) softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_uart.c'))
softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c')) softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c'))
softmmu_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c')) softmmu_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c'))
softmmu_ss.add(when: 'CONFIG_SIFIVE_UART', if_true: files('sifive_uart.c'))
softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_serial.c')) softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_serial.c'))
softmmu_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c')) softmmu_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c'))
softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c')) softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c'))

View File

@ -24,7 +24,7 @@
#include "chardev/char-fe.h" #include "chardev/char-fe.h"
#include "hw/hw.h" #include "hw/hw.h"
#include "hw/irq.h" #include "hw/irq.h"
#include "hw/riscv/sifive_uart.h" #include "hw/char/sifive_uart.h"
/* /*
* Not yet implemented: * Not yet implemented:

View File

@ -15,6 +15,7 @@ config SIFIVE_E
select SIFIVE_CLINT select SIFIVE_CLINT
select SIFIVE_GPIO select SIFIVE_GPIO
select SIFIVE_PLIC select SIFIVE_PLIC
select SIFIVE_UART
select SIFIVE_E_PRCI select SIFIVE_E_PRCI
select UNIMP select UNIMP
@ -27,6 +28,7 @@ config SIFIVE_U
select SIFIVE_GPIO select SIFIVE_GPIO
select SIFIVE_PDMA select SIFIVE_PDMA
select SIFIVE_PLIC select SIFIVE_PLIC
select SIFIVE_UART
select SIFIVE_U_OTP select SIFIVE_U_OTP
select SIFIVE_U_PRCI select SIFIVE_U_PRCI
select UNIMP select UNIMP

View File

@ -5,7 +5,6 @@ riscv_ss.add(when: 'CONFIG_HART', if_true: files('riscv_hart.c'))
riscv_ss.add(when: 'CONFIG_OPENTITAN', if_true: files('opentitan.c')) riscv_ss.add(when: 'CONFIG_OPENTITAN', if_true: files('opentitan.c'))
riscv_ss.add(when: 'CONFIG_RISCV_VIRT', if_true: files('virt.c')) riscv_ss.add(when: 'CONFIG_RISCV_VIRT', if_true: files('virt.c'))
riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_test.c')) riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_test.c'))
riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_uart.c'))
riscv_ss.add(when: 'CONFIG_SIFIVE_E', if_true: files('sifive_e.c')) riscv_ss.add(when: 'CONFIG_SIFIVE_E', if_true: files('sifive_e.c'))
riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u.c')) riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u.c'))
riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c'))

View File

@ -39,9 +39,9 @@
#include "hw/misc/unimp.h" #include "hw/misc/unimp.h"
#include "target/riscv/cpu.h" #include "target/riscv/cpu.h"
#include "hw/riscv/riscv_hart.h" #include "hw/riscv/riscv_hart.h"
#include "hw/riscv/sifive_uart.h"
#include "hw/riscv/sifive_e.h" #include "hw/riscv/sifive_e.h"
#include "hw/riscv/boot.h" #include "hw/riscv/boot.h"
#include "hw/char/sifive_uart.h"
#include "hw/intc/sifive_clint.h" #include "hw/intc/sifive_clint.h"
#include "hw/intc/sifive_plic.h" #include "hw/intc/sifive_plic.h"
#include "hw/misc/sifive_e_prci.h" #include "hw/misc/sifive_e_prci.h"

View File

@ -46,9 +46,9 @@
#include "hw/misc/unimp.h" #include "hw/misc/unimp.h"
#include "target/riscv/cpu.h" #include "target/riscv/cpu.h"
#include "hw/riscv/riscv_hart.h" #include "hw/riscv/riscv_hart.h"
#include "hw/riscv/sifive_uart.h"
#include "hw/riscv/sifive_u.h" #include "hw/riscv/sifive_u.h"
#include "hw/riscv/boot.h" #include "hw/riscv/boot.h"
#include "hw/char/sifive_uart.h"
#include "hw/intc/sifive_clint.h" #include "hw/intc/sifive_clint.h"
#include "hw/intc/sifive_plic.h" #include "hw/intc/sifive_plic.h"
#include "chardev/char.h" #include "chardev/char.h"