hw/riscv: Clean up the directory
Subsystems (3)
cover hw/riscv: Clean up the directory
From: Bin Meng <[email protected]>
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. Peripheral models for a specific SoC are moved to its corresponding hw/* subdirectories.
This series should be applied after the PolarFire SoC series:
http://patchwork.ozlabs.org/project/qemu-devel/list/?series=198727
Bin Meng (12):
hw/riscv: Move sifive_e_prci model to hw/misc hw/riscv: Move sifive_u_prci model to hw/misc hw/riscv: Move sifive_u_otp model to hw/misc hw/riscv: Move sifive_gpio model to hw/gpio hw/riscv: Move sifive_clint model to hw/intc hw/riscv: Move sifive_plic model to hw/intc hw/riscv: Move riscv_htif model to hw/char hw/riscv: Move sifive_uart model to hw/char hw/riscv: Move sifive_test model to hw/misc hw/riscv: Always build riscv_hart.c
hw/riscv: Drop CONFIG_SIFIVE
hw/riscv: Sort the Kconfig options in alphabetical order
{include/hw/riscv => hw/intc}/sifive_plic.h | 0
hw/riscv/trace.h | 1 -
include/hw/{riscv => char}/riscv_htif.h | 0
include/hw/{riscv => char}/sifive_uart.h | 0
include/hw/{riscv => gpio}/sifive_gpio.h | 0
include/hw/{riscv => intc}/sifive_clint.h | 0
include/hw/{riscv => misc}/sifive_e_prci.h | 0
include/hw/{riscv => misc}/sifive_test.h | 0
include/hw/{riscv => misc}/sifive_u_otp.h | 0
include/hw/{riscv => misc}/sifive_u_prci.h | 0
include/hw/riscv/sifive_e.h | 2 +-
include/hw/riscv/sifive_u.h | 6 +--
hw/{riscv => char}/riscv_htif.c | 2 +-
hw/{riscv => char}/sifive_uart.c | 2 +-
hw/{riscv => gpio}/sifive_gpio.c | 2 +-
hw/{riscv => intc}/sifive_clint.c | 2 +-
hw/{riscv => intc}/sifive_plic.c | 2 +-
hw/{riscv => misc}/sifive_e_prci.c | 2 +-
hw/{riscv => misc}/sifive_test.c | 2 +-
hw/{riscv => misc}/sifive_u_otp.c | 2 +-
hw/{riscv => misc}/sifive_u_prci.c | 2 +-
hw/riscv/microchip_pfsoc.c | 4 +-
hw/riscv/sifive_e.c | 8 ++--
hw/riscv/sifive_u.c | 6 +--
hw/riscv/spike.c | 4 +-
hw/riscv/virt.c | 6 +--
hw/char/Kconfig | 6 +++
hw/char/meson.build | 2 +
hw/gpio/Kconfig | 3 ++
hw/gpio/meson.build | 1 +
hw/gpio/trace-events | 6 +++
hw/intc/Kconfig | 6 +++
hw/intc/meson.build | 2 +
hw/misc/Kconfig | 12 +++++
hw/misc/meson.build | 6 +++
hw/riscv/Kconfig | 74 +++++++++++++++--------------
hw/riscv/meson.build | 11 +----
hw/riscv/trace-events | 7 ---
meson.build | 1 -
39 files changed, 110 insertions(+), 82 deletions(-)
rename {include/hw/riscv => hw/intc}/sifive_plic.h (100%)
delete mode 100644 hw/riscv/trace.h
rename include/hw/{riscv => char}/riscv_htif.h (100%)
rename include/hw/{riscv => char}/sifive_uart.h (100%)
rename include/hw/{riscv => gpio}/sifive_gpio.h (100%)
rename include/hw/{riscv => intc}/sifive_clint.h (100%)
rename include/hw/{riscv => misc}/sifive_e_prci.h (100%)
rename include/hw/{riscv => misc}/sifive_test.h (100%)
rename include/hw/{riscv => misc}/sifive_u_otp.h (100%)
rename include/hw/{riscv => misc}/sifive_u_prci.h (100%)
rename hw/{riscv => char}/riscv_htif.c (99%)
rename hw/{riscv => char}/sifive_uart.c (99%)
rename hw/{riscv => gpio}/sifive_gpio.c (99%)
rename hw/{riscv => intc}/sifive_clint.c (99%)
rename hw/{riscv => intc}/sifive_plic.c (99%)
rename hw/{riscv => misc}/sifive_e_prci.c (99%)
rename hw/{riscv => misc}/sifive_test.c (98%)
rename hw/{riscv => misc}/sifive_u_otp.c (99%)
rename hw/{riscv => misc}/sifive_u_prci.c (99%)
delete mode 100644 hw/riscv/trace-eventsSignature · 1 line
2.7.4
PATCH 1/12 hw/riscv: Move sifive_e_prci model to hw/misc
From: Bin Meng <[email protected]>
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_e_prci model to hw/misc directory.
---
include/hw/{riscv => misc}/sifive_e_prci.h | 0
hw/{riscv => misc}/sifive_e_prci.c | 2 +-
hw/riscv/sifive_e.c | 2 +-
hw/misc/Kconfig | 3 +++
hw/misc/meson.build | 3 +++
hw/riscv/Kconfig | 1 +
hw/riscv/meson.build | 1 -
7 files changed, 9 insertions(+), 3 deletions(-)
rename include/hw/{riscv => misc}/sifive_e_prci.h (100%)
rename hw/{riscv => misc}/sifive_e_prci.c (99%)include/hw/misc/sifive_e_prci.h renamed from include/hw/riscv/sifive_e_prci.h +0 -0
hw/misc/sifive_e_prci.c renamed from hw/riscv/sifive_e_prci.c +1 -1
@@ -24,7 +24,7 @@#include "qemu/log.h" #include "qemu/module.h" #include "hw/hw.h" -#include "hw/riscv/sifive_e_prci.h" +#include "hw/misc/sifive_e_prci.h" static uint64_t sifive_e_prci_read (void *opaque,hwaddr addr,unsigned int size) {
hw/riscv/sifive_e.c +1 -1
@@ -43,8 +43,8 @@#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_e.h" -#include "hw/riscv/sifive_e_prci.h" #include "hw/riscv/boot.h" +#include "hw/misc/sifive_e_prci.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/sysemu.h"
hw/misc/Kconfig +3 -0
@@ -134,4 +134,7 @@ config MAC_VIA config AVR_POWER bool +config SIFIVE_E_PRCI + bool + source macio/Kconfig
hw/misc/meson.build +3 -0
@@ -21,6 +21,9 @@ softmmu_ss.add(when: 'CONFIG_ARM11SCU', if_true: files('arm11scu.c')) # Mac devices softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c')) +# RISC-V devices +softmmu_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c')) + # PKUnity SoC devices softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_pm.c'))
hw/riscv/Kconfig +1 -0
@@ -15,6 +15,7 @@ config SIFIVE_E bool select HART select SIFIVE + select SIFIVE_E_PRCI select UNIMP config SIFIVE_U
hw/riscv/meson.build +0 -1
@@ -10,7 +10,6 @@ riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.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_prci.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_otp.c')) riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_prci.c'))
Signature · 1 line
2.7.4
Re: [PATCH 01/12] hw/riscv: Move sifive_e_prci model to hw/misc
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
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_e_prcimodel to hw/misc directory.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 101 lines
---
include/hw/{riscv => misc}/sifive_e_prci.h | 0 hw/{riscv => misc}/sifive_e_prci.c | 2 +- hw/riscv/sifive_e.c | 2 +- hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 3 +++ hw/riscv/Kconfig | 1 + hw/riscv/meson.build | 1 - 7 files changed, 9 insertions(+), 3 deletions(-) rename include/hw/{riscv => misc}/sifive_e_prci.h (100%) rename hw/{riscv => misc}/sifive_e_prci.c (99%)include/hw/misc/sifive_e_prci.h renamed from include/hw/riscv/sifive_e_prci.h +0
-0hw/misc/sifive_e_prci.c renamed from hw/riscv/sifive_e_prci.c +1
-1@@ -24,7 +24,7 @@#include "qemu/log.h" #include "qemu/module.h" #include "hw/hw.h" -#include "hw/riscv/sifive_e_prci.h" +#include "hw/misc/sifive_e_prci.h" static uint64_t sifive_e_prci_read (void *opaque,hwaddr addr,unsigned int size) {hw/riscv/sifive_e.c +1
-1@@ -43,8 +43,8 @@#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_e.h" -#include "hw/riscv/sifive_e_prci.h" #include "hw/riscv/boot.h" +#include "hw/misc/sifive_e_prci.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/sysemu.h" hw/misc/Kconfig +3
-0@@ -134,4 +134,7 @@ config MAC_VIA config AVR_POWER bool +config SIFIVE_E_PRCI + bool + source macio/Kconfighw/misc/meson.build +3
-0@@ -21,6 +21,9 @@ softmmu_ss.add(when: 'CONFIG_ARM11SCU', if_true: files('arm11scu.c')) # Mac devices softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c')) +# RISC-V devices +softmmu_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c')) + # PKUnity SoC devices softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_pm.c'))hw/riscv/Kconfig +1
-0@@ -15,6 +15,7 @@ config SIFIVE_E bool select HART select SIFIVE + select SIFIVE_E_PRCI select UNIMP config SIFIVE_Uhw/riscv/meson.build +0
-2@@ -10,7 +10,6 @@ riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.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_prci.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_otp.c')) riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_prci.c')) --2.7.4
PATCH 2/12 hw/riscv: Move sifive_u_prci model to hw/misc
In reply to Bin MengFrom: Bin Meng <[email protected]>
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_u_prci model to hw/misc directory.
---
include/hw/{riscv => misc}/sifive_u_prci.h | 0
include/hw/riscv/sifive_u.h | 2 +-
hw/{riscv => misc}/sifive_u_prci.c | 2 +-
hw/misc/Kconfig | 3 +++
hw/misc/meson.build | 1 +
hw/riscv/Kconfig | 1 +
hw/riscv/meson.build | 1 -
7 files changed, 7 insertions(+), 3 deletions(-)
rename include/hw/{riscv => misc}/sifive_u_prci.h (100%)
rename hw/{riscv => misc}/sifive_u_prci.c (99%)include/hw/misc/sifive_u_prci.h renamed from include/hw/riscv/sifive_u_prci.h +0 -0
include/hw/riscv/sifive_u.h +1 -1
@@ -24,8 +24,8 @@#include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_cpu.h" #include "hw/riscv/sifive_gpio.h" -#include "hw/riscv/sifive_u_prci.h" #include "hw/riscv/sifive_u_otp.h" +#include "hw/misc/sifive_u_prci.h" #define TYPE_RISCV_U_SOC "riscv.sifive.u.soc"#define RISCV_U_SOC (obj) \
hw/misc/sifive_u_prci.c renamed from hw/riscv/sifive_u_prci.c +1 -1
@@ -22,7 +22,7 @@#include "hw/sysbus.h" #include "qemu/log.h" #include "qemu/module.h" -#include "hw/riscv/sifive_u_prci.h" +#include "hw/misc/sifive_u_prci.h" static uint64_t sifive_u_prci_read (void *opaque,hwaddr addr,unsigned int size) {
hw/misc/Kconfig +3 -0
@@ -137,4 +137,7 @@ config AVR_POWER config SIFIVE_E_PRCI bool +config SIFIVE_U_PRCI + bool + source macio/Kconfig
hw/misc/meson.build +1 -0
@@ -23,6 +23,7 @@ softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c')) # RISC-V devices softmmu_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c')) +softmmu_ss.add(when: 'CONFIG_SIFIVE_U_PRCI', if_true: files('sifive_u_prci.c')) # PKUnity SoC devices softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_pm.c'))
hw/riscv/Kconfig +1 -0
@@ -24,6 +24,7 @@ config SIFIVE_U select HART select SIFIVE select SIFIVE_PDMA + select SIFIVE_U_PRCI select UNIMP config SPIKE
hw/riscv/meson.build +0 -1
@@ -12,7 +12,6 @@ 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_U', if_true: files('sifive_u.c')) riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_otp.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_prci.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('riscv_htif.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c')) riscv_ss.add(when: 'CONFIG_MICROCHIP_PFSOC', if_true: files('microchip_pfsoc.c'))
Signature · 1 line
2.7.4
Re: [PATCH 02/12] hw/riscv: Move sifive_u_prci model to hw/misc
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
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_u_prcimodel to hw/misc directory.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 99 lines
---
include/hw/{riscv => misc}/sifive_u_prci.h | 0 include/hw/riscv/sifive_u.h | 2 +- hw/{riscv => misc}/sifive_u_prci.c | 2 +- hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 1 + hw/riscv/Kconfig | 1 + hw/riscv/meson.build | 1 - 7 files changed, 7 insertions(+), 3 deletions(-) rename include/hw/{riscv => misc}/sifive_u_prci.h (100%) rename hw/{riscv => misc}/sifive_u_prci.c (99%)include/hw/misc/sifive_u_prci.h renamed from include/hw/riscv/sifive_u_prci.h +0
-0include/hw/riscv/sifive_u.h +1
-1@@ -24,8 +24,8 @@#include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_cpu.h" #include "hw/riscv/sifive_gpio.h" -#include "hw/riscv/sifive_u_prci.h" #include "hw/riscv/sifive_u_otp.h" +#include "hw/misc/sifive_u_prci.h" #define TYPE_RISCV_U_SOC "riscv.sifive.u.soc"#define RISCV_U_SOC (obj) \hw/misc/sifive_u_prci.c renamed from hw/riscv/sifive_u_prci.c +1
-1@@ -22,7 +22,7 @@#include "hw/sysbus.h" #include "qemu/log.h" #include "qemu/module.h" -#include "hw/riscv/sifive_u_prci.h" +#include "hw/misc/sifive_u_prci.h" static uint64_t sifive_u_prci_read (void *opaque,hwaddr addr,unsigned int size) {hw/misc/Kconfig +3
-0@@ -137,4 +137,7 @@ config AVR_POWER config SIFIVE_E_PRCI bool +config SIFIVE_U_PRCI + bool + source macio/Kconfighw/misc/meson.build +1
-0@@ -23,6 +23,7 @@ softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c')) # RISC-V devices softmmu_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c')) +softmmu_ss.add(when: 'CONFIG_SIFIVE_U_PRCI', if_true: files('sifive_u_prci.c')) # PKUnity SoC devices softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_pm.c'))hw/riscv/Kconfig +1
-0@@ -24,6 +24,7 @@ config SIFIVE_U select HART select SIFIVE select SIFIVE_PDMA + select SIFIVE_U_PRCI select UNIMP config SPIKEhw/riscv/meson.build +0
-2@@ -12,7 +12,6 @@ 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_U', if_true: files('sifive_u.c')) riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_otp.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_prci.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('riscv_htif.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c')) riscv_ss.add(when: 'CONFIG_MICROCHIP_PFSOC', if_true: files('microchip_pfsoc.c')) --2.7.4
PATCH 3/12 hw/riscv: Move sifive_u_otp model to hw/misc
In reply to Bin MengFrom: Bin Meng <[email protected]>
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_u_otp model to hw/misc directory.
---
include/hw/{riscv => misc}/sifive_u_otp.h | 0
include/hw/riscv/sifive_u.h | 2 +-
hw/{riscv => misc}/sifive_u_otp.c | 2 +-
hw/misc/Kconfig | 3 +++
hw/misc/meson.build | 1 +
hw/riscv/Kconfig | 1 +
hw/riscv/meson.build | 1 -
7 files changed, 7 insertions(+), 3 deletions(-)
rename include/hw/{riscv => misc}/sifive_u_otp.h (100%)
rename hw/{riscv => misc}/sifive_u_otp.c (99%)include/hw/misc/sifive_u_otp.h renamed from include/hw/riscv/sifive_u_otp.h +0 -0
include/hw/riscv/sifive_u.h +1 -1
@@ -24,7 +24,7 @@#include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_cpu.h" #include "hw/riscv/sifive_gpio.h" -#include "hw/riscv/sifive_u_otp.h" +#include "hw/misc/sifive_u_otp.h" #include "hw/misc/sifive_u_prci.h" #define TYPE_RISCV_U_SOC "riscv.sifive.u.soc"
hw/misc/sifive_u_otp.c renamed from hw/riscv/sifive_u_otp.c +1 -1
@@ -23,7 +23,7 @@#include "hw/sysbus.h" #include "qemu/log.h" #include "qemu/module.h" -#include "hw/riscv/sifive_u_otp.h" +#include "hw/misc/sifive_u_otp.h" static uint64_t sifive_u_otp_read (void *opaque,hwaddr addr,unsigned int size) {
hw/misc/Kconfig +3 -0
@@ -137,6 +137,9 @@ config AVR_POWER config SIFIVE_E_PRCI bool +config SIFIVE_U_OTP + bool + config SIFIVE_U_PRCI bool
hw/misc/meson.build +1 -0
@@ -23,6 +23,7 @@ softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c')) # RISC-V devices softmmu_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c')) +softmmu_ss.add(when: 'CONFIG_SIFIVE_U_OTP', if_true: files('sifive_u_otp.c')) softmmu_ss.add(when: 'CONFIG_SIFIVE_U_PRCI', if_true: files('sifive_u_prci.c')) # PKUnity SoC devices
hw/riscv/Kconfig +1 -0
@@ -24,6 +24,7 @@ config SIFIVE_U select HART select SIFIVE select SIFIVE_PDMA + select SIFIVE_U_OTP select SIFIVE_U_PRCI select UNIMP
hw/riscv/meson.build +0 -1
@@ -11,7 +11,6 @@ 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_U', if_true: files('sifive_u.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_otp.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('riscv_htif.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c')) riscv_ss.add(when: 'CONFIG_MICROCHIP_PFSOC', if_true: files('microchip_pfsoc.c'))
Signature · 1 line
2.7.4
Re: [PATCH 03/12] hw/riscv: Move sifive_u_otp model to hw/misc
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
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_u_otpmodel to hw/misc directory.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 100 lines
---
include/hw/{riscv => misc}/sifive_u_otp.h | 0 include/hw/riscv/sifive_u.h | 2 +- hw/{riscv => misc}/sifive_u_otp.c | 2 +- hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 1 + hw/riscv/Kconfig | 1 + hw/riscv/meson.build | 1 - 7 files changed, 7 insertions(+), 3 deletions(-) rename include/hw/{riscv => misc}/sifive_u_otp.h (100%) rename hw/{riscv => misc}/sifive_u_otp.c (99%)include/hw/misc/sifive_u_otp.h renamed from include/hw/riscv/sifive_u_otp.h +0
-0include/hw/riscv/sifive_u.h +1
-1@@ -24,7 +24,7 @@#include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_cpu.h" #include "hw/riscv/sifive_gpio.h" -#include "hw/riscv/sifive_u_otp.h" +#include "hw/misc/sifive_u_otp.h" #include "hw/misc/sifive_u_prci.h" #define TYPE_RISCV_U_SOC "riscv.sifive.u.soc"hw/misc/sifive_u_otp.c renamed from hw/riscv/sifive_u_otp.c +1
-1@@ -23,7 +23,7 @@#include "hw/sysbus.h" #include "qemu/log.h" #include "qemu/module.h" -#include "hw/riscv/sifive_u_otp.h" +#include "hw/misc/sifive_u_otp.h" static uint64_t sifive_u_otp_read (void *opaque,hwaddr addr,unsigned int size) {hw/misc/Kconfig +3
-0@@ -137,6 +137,9 @@ config AVR_POWER config SIFIVE_E_PRCI bool +config SIFIVE_U_OTP + bool + config SIFIVE_U_PRCI boolhw/misc/meson.build +1
-0@@ -23,6 +23,7 @@ softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c')) # RISC-V devices softmmu_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c')) +softmmu_ss.add(when: 'CONFIG_SIFIVE_U_OTP', if_true: files('sifive_u_otp.c')) softmmu_ss.add(when: 'CONFIG_SIFIVE_U_PRCI', if_true: files('sifive_u_prci.c')) # PKUnity SoC deviceshw/riscv/Kconfig +1
-0@@ -24,6 +24,7 @@ config SIFIVE_U select HART select SIFIVE select SIFIVE_PDMA + select SIFIVE_U_OTP select SIFIVE_U_PRCI select UNIMPhw/riscv/meson.build +0
-2@@ -11,7 +11,6 @@ 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_U', if_true: files('sifive_u.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_otp.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('riscv_htif.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c')) riscv_ss.add(when: 'CONFIG_MICROCHIP_PFSOC', if_true: files('microchip_pfsoc.c')) --2.7.4
PATCH 4/12 hw/riscv: Move sifive_gpio model to hw/gpio
In reply to Bin MengFrom: Bin Meng <[email protected]>
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_gpio model to hw/gpio directory.
Note this also removes the trace-events in the hw/riscv directory, since gpio is the only supported trace target in that directory.
---
hw/riscv/trace.h | 1 -
include/hw/{riscv => gpio}/sifive_gpio.h | 0
include/hw/riscv/sifive_e.h | 2 +-
include/hw/riscv/sifive_u.h | 2 +-
hw/{riscv => gpio}/sifive_gpio.c | 2 +-
hw/gpio/Kconfig | 3 +++
hw/gpio/meson.build | 1 +
hw/gpio/trace-events | 6 ++++++
hw/riscv/Kconfig | 2 ++
hw/riscv/meson.build | 1 -
hw/riscv/trace-events | 7 -------
meson.build | 1 -
12 files changed, 15 insertions(+), 13 deletions(-)
delete mode 100644 hw/riscv/trace.h
rename include/hw/{riscv => gpio}/sifive_gpio.h (100%)
rename hw/{riscv => gpio}/sifive_gpio.c (99%)
delete mode 100644 hw/riscv/trace-eventshw/riscv/trace.h deleted +0 -1
@@ -1 +0,0 @@ -#include "trace/trace-hw_riscv.h"
include/hw/gpio/sifive_gpio.h renamed from include/hw/riscv/sifive_gpio.h +0 -0
include/hw/riscv/sifive_e.h +1 -1
@@ -21,7 +21,7 @@#include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_cpu.h" -#include "hw/riscv/sifive_gpio.h" +#include "hw/gpio/sifive_gpio.h" #define TYPE_RISCV_E_SOC "riscv.sifive.e.soc"#define RISCV_E_SOC (obj) \
include/hw/riscv/sifive_u.h +1 -1
@@ -23,7 +23,7 @@#include "hw/net/cadence_gem.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_cpu.h" -#include "hw/riscv/sifive_gpio.h" +#include "hw/gpio/sifive_gpio.h" #include "hw/misc/sifive_u_otp.h" #include "hw/misc/sifive_u_prci.h"
hw/gpio/sifive_gpio.c renamed from hw/riscv/sifive_gpio.c +1 -1
@@ -15,7 +15,7 @@#include "qemu/log.h" #include "hw/irq.h" #include "hw/qdev-properties.h" -#include "hw/riscv/sifive_gpio.h" +#include "hw/gpio/sifive_gpio.h" #include "migration/vmstate.h" #include "trace.h"
hw/gpio/Kconfig +3 -0
@@ -7,3 +7,6 @@ config PL061 config GPIO_KEY bool + +config SIFIVE_GPIO + bool
hw/gpio/meson.build +1 -0
@@ -10,3 +10,4 @@ softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c')) softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c')) softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c')) softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_gpio.c')) +softmmu_ss.add(when: 'CONFIG_SIFIVE_GPIO', if_true: files('sifive_gpio.c'))
hw/gpio/trace-events +6 -0
@@ -5,3 +5,9 @@ nrf51_gpio_read(uint64_t offset, uint64_t r) "offset 0x%" PRIx64 " value 0x%" PR nrf51_gpio_write(uint64_t offset, uint64_t value) "offset 0x%" PRIx64 " value 0x%" PRIx64 nrf51_gpio_set(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64 nrf51_gpio_update_output_irq(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64 + +# sifive_gpio.c +sifive_gpio_read(uint64_t offset, uint64_t r) "offset 0x%" PRIx64 " value 0x%" PRIx64 +sifive_gpio_write(uint64_t offset, uint64_t value) "offset 0x%" PRIx64 " value 0x%" PRIx64 +sifive_gpio_set(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64 +sifive_gpio_update_output_irq(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64
hw/riscv/Kconfig +2 -0
@@ -15,6 +15,7 @@ config SIFIVE_E bool select HART select SIFIVE + select SIFIVE_GPIO select SIFIVE_E_PRCI select UNIMP
@@ -23,6 +24,7 @@ config SIFIVE_U select CADENCE select HART select SIFIVE + select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_U_OTP select SIFIVE_U_PRCI
hw/riscv/meson.build +0 -1
@@ -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_RISCV_VIRT', if_true: files('virt.c')) riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_clint.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_gpio.c')) riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.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'))
hw/riscv/trace-events deleted +0 -7
@@ -1,7 +0,0 @@ -# See docs/devel/tracing.txt for syntax documentation. - -# hw/gpio/sifive_gpio.c -sifive_gpio_read(uint64_t offset, uint64_t r) "offset 0x%" PRIx64 " value 0x%" PRIx64 -sifive_gpio_write(uint64_t offset, uint64_t value) "offset 0x%" PRIx64 " value 0x%" PRIx64 -sifive_gpio_set(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64 -sifive_gpio_update_output_irq(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64
meson.build +0 -1
@@ -706,7 +706,6 @@ if have_system 'hw/watchdog', 'hw/xen', 'hw/gpio', - 'hw/riscv', 'migration', 'net', 'ui',
Signature · 1 line
2.7.4
Re: [PATCH 04/12] hw/riscv: Move sifive_gpio model to hw/gpio
Quoted 11 lines · Bin Meng
From: Bin Meng <[email protected]>
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_gpiomodel to hw/gpio directory.Note this also removes the trace-events in the hw/riscv directory, since gpio is the only supported trace target in that directory.
Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 168 lines
---
hw/riscv/trace.h | 1 - include/hw/{riscv => gpio}/sifive_gpio.h | 0 include/hw/riscv/sifive_e.h | 2 +- include/hw/riscv/sifive_u.h | 2 +- hw/{riscv => gpio}/sifive_gpio.c | 2 +- hw/gpio/Kconfig | 3 +++ hw/gpio/meson.build | 1 + hw/gpio/trace-events | 6 ++++++ hw/riscv/Kconfig | 2 ++ hw/riscv/meson.build | 1 - hw/riscv/trace-events | 7 ------- meson.build | 1 - 12 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 hw/riscv/trace.h rename include/hw/{riscv => gpio}/sifive_gpio.h (100%) rename hw/{riscv => gpio}/sifive_gpio.c (99%) delete mode 100644 hw/riscv/trace-eventshw/riscv/trace.h deleted +0
-1@@ -1 +0,0 @@ -#include "trace/trace-hw_riscv.h" include/hw/gpio/sifive_gpio.h renamed from include/hw/riscv/sifive_gpio.h +0
-0include/hw/riscv/sifive_e.h +1
-1@@ -21,7 +21,7 @@#include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_cpu.h" -#include "hw/riscv/sifive_gpio.h" +#include "hw/gpio/sifive_gpio.h" #define TYPE_RISCV_E_SOC "riscv.sifive.e.soc"#define RISCV_E_SOC (obj) \include/hw/riscv/sifive_u.h +1
-1@@ -23,7 +23,7 @@#include "hw/net/cadence_gem.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_cpu.h" -#include "hw/riscv/sifive_gpio.h" +#include "hw/gpio/sifive_gpio.h" #include "hw/misc/sifive_u_otp.h" #include "hw/misc/sifive_u_prci.h" hw/gpio/sifive_gpio.c renamed from hw/riscv/sifive_gpio.c +1
-1@@ -15,7 +15,7 @@#include "qemu/log.h" #include "hw/irq.h" #include "hw/qdev-properties.h" -#include "hw/riscv/sifive_gpio.h" +#include "hw/gpio/sifive_gpio.h" #include "migration/vmstate.h" #include "trace.h" hw/gpio/Kconfig +3
-0@@ -7,3 +7,6 @@ config PL061 config GPIO_KEY bool + +config SIFIVE_GPIO + boolhw/gpio/meson.build +1
-0@@ -10,3 +10,4 @@ softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c')) softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c')) softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c')) softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_gpio.c')) +softmmu_ss.add(when: 'CONFIG_SIFIVE_GPIO', if_true: files('sifive_gpio.c'))hw/gpio/trace-events +6
-0@@ -5,3 +5,9 @@ nrf51_gpio_read(uint64_t offset, uint64_t r) "offset 0x%" PRIx64 " value 0x%" PR nrf51_gpio_write(uint64_t offset, uint64_t value) "offset 0x%" PRIx64 " value 0x%" PRIx64 nrf51_gpio_set(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64 nrf51_gpio_update_output_irq(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64 + +# sifive_gpio.c +sifive_gpio_read(uint64_t offset, uint64_t r) "offset 0x%" PRIx64 " value 0x%" PRIx64 +sifive_gpio_write(uint64_t offset, uint64_t value) "offset 0x%" PRIx64 " value 0x%" PRIx64 +sifive_gpio_set(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64 +sifive_gpio_update_output_irq(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64hw/riscv/Kconfig +2
-0@@ -15,6 +15,7 @@ config SIFIVE_E bool select HART select SIFIVE + select SIFIVE_GPIO select SIFIVE_E_PRCI select UNIMP@@ -23,6 +24,7 @@ config SIFIVE_U select CADENCE select HART select SIFIVE + select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_U_OTP select SIFIVE_U_PRCIhw/riscv/meson.build +0
-1@@ -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_RISCV_VIRT', if_true: files('virt.c')) riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_clint.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_gpio.c')) riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.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'))hw/riscv/trace-events deleted +0
-7@@ -1,7 +0,0 @@ -# See docs/devel/tracing.txt for syntax documentation. - -# hw/gpio/sifive_gpio.c -sifive_gpio_read(uint64_t offset, uint64_t r) "offset 0x%" PRIx64 " value 0x%" PRIx64 -sifive_gpio_write(uint64_t offset, uint64_t value) "offset 0x%" PRIx64 " value 0x%" PRIx64 -sifive_gpio_set(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64 -sifive_gpio_update_output_irq(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64meson.build +0
-2@@ -706,7 +706,6 @@ if have_system 'hw/watchdog', 'hw/xen', 'hw/gpio', - 'hw/riscv', 'migration', 'net', 'ui', --2.7.4
PATCH 5/12 hw/riscv: Move sifive_clint model to hw/intc
In reply to Bin MengFrom: Bin Meng <[email protected]>
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_clint model to hw/intc directory.
---
include/hw/{riscv => intc}/sifive_clint.h | 0
hw/{riscv => intc}/sifive_clint.c | 2 +-
hw/riscv/microchip_pfsoc.c | 2 +-
hw/riscv/sifive_e.c | 2 +-
hw/riscv/sifive_u.c | 2 +-
hw/riscv/spike.c | 2 +-
hw/riscv/virt.c | 2 +-
hw/intc/Kconfig | 3 +++
hw/intc/meson.build | 1 +
hw/riscv/Kconfig | 5 +++++
hw/riscv/meson.build | 1 -
11 files changed, 15 insertions(+), 7 deletions(-)
rename include/hw/{riscv => intc}/sifive_clint.h (100%)
rename hw/{riscv => intc}/sifive_clint.c (99%)include/hw/intc/sifive_clint.h renamed from include/hw/riscv/sifive_clint.h +0 -0
hw/intc/sifive_clint.c renamed from hw/riscv/sifive_clint.c +1 -1
@@ -26,7 +26,7 @@#include "hw/sysbus.h" #include "target/riscv/cpu.h" #include "hw/qdev-properties.h" -#include "hw/riscv/sifive_clint.h" +#include "hw/intc/sifive_clint.h" #include "qemu/timer.h" static uint64_t cpu_riscv_read_rtc (uint32_t timebase_freq)
hw/riscv/microchip_pfsoc.c +1 -1
@@ -48,9 +48,9 @@#include "hw/misc/unimp.h" #include "hw/riscv/boot.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_plic.h" #include "hw/riscv/microchip_pfsoc.h" +#include "hw/intc/sifive_clint.h" #include "sysemu/sysemu.h" /*
hw/riscv/sifive_e.c +1 -1
@@ -40,10 +40,10 @@#include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_plic.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_e.h" #include "hw/riscv/boot.h" +#include "hw/intc/sifive_clint.h" #include "hw/misc/sifive_e_prci.h" #include "chardev/char.h" #include "sysemu/arch_init.h"
hw/riscv/sifive_u.c +1 -1
@@ -47,10 +47,10 @@#include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_plic.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_u.h" #include "hw/riscv/boot.h" +#include "hw/intc/sifive_clint.h" #include "chardev/char.h" #include "net/eth.h" #include "sysemu/arch_init.h"
hw/riscv/spike.c +1 -1
@@ -33,10 +33,10 @@#include "target/riscv/cpu.h" #include "hw/riscv/riscv_htif.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/spike.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" +#include "hw/intc/sifive_clint.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h"
hw/riscv/virt.c +1 -1
@@ -31,11 +31,11 @@#include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_plic.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_test.h" #include "hw/riscv/virt.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" +#include "hw/intc/sifive_clint.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h"
hw/intc/Kconfig +3 -0
@@ -67,3 +67,6 @@ config RX_ICU config LOONGSON_LIOINTC bool + +config SIFIVE_CLINT + bool
hw/intc/meson.build +1 -0
@@ -47,6 +47,7 @@ specific_ss.add(when: 'CONFIG_RX_ICU', if_true: files('rx_icu.c')) specific_ss.add(when: 'CONFIG_S390_FLIC', if_true: files('s390_flic.c')) specific_ss.add(when: 'CONFIG_S390_FLIC_KVM', if_true: files('s390_flic_kvm.c')) specific_ss.add(when: 'CONFIG_SH4', if_true: files('sh_intc.c')) +specific_ss.add(when: 'CONFIG_SIFIVE_CLINT', if_true: files('sifive_clint.c')) specific_ss.add(when: 'CONFIG_XICS', if_true: files('xics.c')) specific_ss.add(when: 'CONFIG_XICS_KVM', if_true: files('xics_kvm.c')) specific_ss.add(when: 'CONFIG_XICS_SPAPR', if_true: files('xics_spapr.c'))
hw/riscv/Kconfig +5 -0
@@ -15,6 +15,7 @@ config SIFIVE_E bool select HART select SIFIVE + select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_E_PRCI select UNIMP
@@ -24,6 +25,7 @@ config SIFIVE_U select CADENCE select HART select SIFIVE + select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_U_OTP
@@ -35,6 +37,7 @@ config SPIKE select HART select HTIF select SIFIVE + select SIFIVE_CLINT config OPENTITAN bool
@@ -54,11 +57,13 @@ config RISCV_VIRT select PCI_EXPRESS_GENERIC_BRIDGE select PFLASH_CFI01 select SIFIVE + select SIFIVE_CLINT config MICROCHIP_PFSOC bool select HART select SIFIVE + select SIFIVE_CLINT select UNIMP select MCHP_PFSOC_MMUART select SIFIVE_PDMA
hw/riscv/meson.build +0 -1
@@ -4,7 +4,6 @@ riscv_ss.add(files('numa.c')) 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_RISCV_VIRT', if_true: files('virt.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_clint.c')) riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.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'))
Signature · 1 line
2.7.4
Re: [PATCH 05/12] hw/riscv: Move sifive_clint model to hw/intc
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
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_clintmodel to hw/intc directory.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 198 lines
---
include/hw/{riscv => intc}/sifive_clint.h | 0 hw/{riscv => intc}/sifive_clint.c | 2 +- hw/riscv/microchip_pfsoc.c | 2 +- hw/riscv/sifive_e.c | 2 +- hw/riscv/sifive_u.c | 2 +- hw/riscv/spike.c | 2 +- hw/riscv/virt.c | 2 +- hw/intc/Kconfig | 3 +++ hw/intc/meson.build | 1 + hw/riscv/Kconfig | 5 +++++ hw/riscv/meson.build | 1 - 11 files changed, 15 insertions(+), 7 deletions(-) rename include/hw/{riscv => intc}/sifive_clint.h (100%) rename hw/{riscv => intc}/sifive_clint.c (99%)include/hw/intc/sifive_clint.h renamed from include/hw/riscv/sifive_clint.h +0
-0hw/intc/sifive_clint.c renamed from hw/riscv/sifive_clint.c +1
-1@@ -26,7 +26,7 @@#include "hw/sysbus.h" #include "target/riscv/cpu.h" #include "hw/qdev-properties.h" -#include "hw/riscv/sifive_clint.h" +#include "hw/intc/sifive_clint.h" #include "qemu/timer.h" static uint64_t cpu_riscv_read_rtc (uint32_t timebase_freq)hw/riscv/microchip_pfsoc.c +1
-1@@ -48,9 +48,9 @@#include "hw/misc/unimp.h" #include "hw/riscv/boot.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_plic.h" #include "hw/riscv/microchip_pfsoc.h" +#include "hw/intc/sifive_clint.h" #include "sysemu/sysemu.h" /* hw/riscv/sifive_e.c +1
-1@@ -40,10 +40,10 @@#include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_plic.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_e.h" #include "hw/riscv/boot.h" +#include "hw/intc/sifive_clint.h" #include "hw/misc/sifive_e_prci.h" #include "chardev/char.h" #include "sysemu/arch_init.h" hw/riscv/sifive_u.c +1
-1@@ -47,10 +47,10 @@#include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_plic.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_u.h" #include "hw/riscv/boot.h" +#include "hw/intc/sifive_clint.h" #include "chardev/char.h" #include "net/eth.h" #include "sysemu/arch_init.h" hw/riscv/spike.c +1
-1@@ -33,10 +33,10 @@#include "target/riscv/cpu.h" #include "hw/riscv/riscv_htif.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/spike.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" +#include "hw/intc/sifive_clint.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h" hw/riscv/virt.c +1
-1@@ -31,11 +31,11 @@#include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/sifive_plic.h" -#include "hw/riscv/sifive_clint.h" #include "hw/riscv/sifive_test.h" #include "hw/riscv/virt.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" +#include "hw/intc/sifive_clint.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h" hw/intc/Kconfig +3
-0@@ -67,3 +67,6 @@ config RX_ICU config LOONGSON_LIOINTC bool + +config SIFIVE_CLINT + boolhw/intc/meson.build +1
-0@@ -47,6 +47,7 @@ specific_ss.add(when: 'CONFIG_RX_ICU', if_true: files('rx_icu.c')) specific_ss.add(when: 'CONFIG_S390_FLIC', if_true: files('s390_flic.c')) specific_ss.add(when: 'CONFIG_S390_FLIC_KVM', if_true: files('s390_flic_kvm.c')) specific_ss.add(when: 'CONFIG_SH4', if_true: files('sh_intc.c')) +specific_ss.add(when: 'CONFIG_SIFIVE_CLINT', if_true: files('sifive_clint.c')) specific_ss.add(when: 'CONFIG_XICS', if_true: files('xics.c')) specific_ss.add(when: 'CONFIG_XICS_KVM', if_true: files('xics_kvm.c')) specific_ss.add(when: 'CONFIG_XICS_SPAPR', if_true: files('xics_spapr.c'))hw/riscv/Kconfig +5
-0@@ -15,6 +15,7 @@ config SIFIVE_E bool select HART select SIFIVE + select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_E_PRCI select UNIMP@@ -24,6 +25,7 @@ config SIFIVE_U select CADENCE select HART select SIFIVE + select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_U_OTP@@ -35,6 +37,7 @@ config SPIKE select HART select HTIF select SIFIVE + select SIFIVE_CLINT config OPENTITAN bool@@ -54,11 +57,13 @@ config RISCV_VIRT select PCI_EXPRESS_GENERIC_BRIDGE select PFLASH_CFI01 select SIFIVE + select SIFIVE_CLINT config MICROCHIP_PFSOC bool select HART select SIFIVE + select SIFIVE_CLINT select UNIMP select MCHP_PFSOC_MMUART select SIFIVE_PDMAhw/riscv/meson.build +0
-2@@ -4,7 +4,6 @@ riscv_ss.add(files('numa.c')) 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_RISCV_VIRT', if_true: files('virt.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_clint.c')) riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.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')) --2.7.4
PATCH 6/12 hw/riscv: Move sifive_plic model to hw/intc
In reply to Bin MengFrom: Bin Meng <[email protected]>
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_plic model to hw/intc directory.
---
{include/hw/riscv => hw/intc}/sifive_plic.h | 0
hw/{riscv => intc}/sifive_plic.c | 2 +-
hw/riscv/microchip_pfsoc.c | 2 +-
hw/riscv/sifive_e.c | 2 +-
hw/riscv/sifive_u.c | 2 +-
hw/riscv/virt.c | 2 +-
hw/intc/Kconfig | 3 +++
hw/intc/meson.build | 1 +
hw/riscv/Kconfig | 5 +++++
hw/riscv/meson.build | 1 -
10 files changed, 14 insertions(+), 6 deletions(-)
rename {include/hw/riscv => hw/intc}/sifive_plic.h (100%)
rename hw/{riscv => intc}/sifive_plic.c (99%)hw/intc/sifive_plic.h renamed from include/hw/riscv/sifive_plic.h +0 -0
hw/intc/sifive_plic.c renamed from hw/riscv/sifive_plic.c +1 -1
@@ -27,9 +27,9 @@#include "hw/pci/msi.h" #include "hw/boards.h" #include "hw/qdev-properties.h" +#include "hw/intc/sifive_plic.h" #include "target/riscv/cpu.h" #include "sysemu/sysemu.h" -#include "hw/riscv/sifive_plic.h" #define RISCV_DEBUG_PLIC 0
hw/riscv/microchip_pfsoc.c +1 -1
@@ -48,9 +48,9 @@#include "hw/misc/unimp.h" #include "hw/riscv/boot.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_plic.h" #include "hw/riscv/microchip_pfsoc.h" #include "hw/intc/sifive_clint.h" +#include "hw/intc/sifive_plic.h" #include "sysemu/sysemu.h" /*
hw/riscv/sifive_e.c +1 -1
@@ -39,11 +39,11 @@#include "hw/misc/unimp.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_plic.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_e.h" #include "hw/riscv/boot.h" #include "hw/intc/sifive_clint.h" +#include "hw/intc/sifive_plic.h" #include "hw/misc/sifive_e_prci.h" #include "chardev/char.h" #include "sysemu/arch_init.h"
hw/riscv/sifive_u.c +1 -1
@@ -46,11 +46,11 @@#include "hw/misc/unimp.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_plic.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_u.h" #include "hw/riscv/boot.h" #include "hw/intc/sifive_clint.h" +#include "hw/intc/sifive_plic.h" #include "chardev/char.h" #include "net/eth.h" #include "sysemu/arch_init.h"
hw/riscv/virt.c +1 -1
@@ -30,12 +30,12 @@#include "hw/char/serial.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_plic.h" #include "hw/riscv/sifive_test.h" #include "hw/riscv/virt.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" #include "hw/intc/sifive_clint.h" +#include "hw/intc/sifive_plic.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h"
hw/intc/Kconfig +3 -0
@@ -70,3 +70,6 @@ config LOONGSON_LIOINTC config SIFIVE_CLINT bool + +config SIFIVE_PLIC + bool
hw/intc/meson.build +1 -0
@@ -48,6 +48,7 @@ specific_ss.add(when: 'CONFIG_S390_FLIC', if_true: files('s390_flic.c')) specific_ss.add(when: 'CONFIG_S390_FLIC_KVM', if_true: files('s390_flic_kvm.c')) specific_ss.add(when: 'CONFIG_SH4', if_true: files('sh_intc.c')) specific_ss.add(when: 'CONFIG_SIFIVE_CLINT', if_true: files('sifive_clint.c')) +specific_ss.add(when: 'CONFIG_SIFIVE_PLIC', if_true: files('sifive_plic.c')) specific_ss.add(when: 'CONFIG_XICS', if_true: files('xics.c')) specific_ss.add(when: 'CONFIG_XICS_KVM', if_true: files('xics_kvm.c')) specific_ss.add(when: 'CONFIG_XICS_SPAPR', if_true: files('xics_spapr.c'))
hw/riscv/Kconfig +5 -0
@@ -17,6 +17,7 @@ config SIFIVE_E select SIFIVE select SIFIVE_CLINT select SIFIVE_GPIO + select SIFIVE_PLIC select SIFIVE_E_PRCI select UNIMP
@@ -28,6 +29,7 @@ config SIFIVE_U select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PDMA + select SIFIVE_PLIC select SIFIVE_U_OTP select SIFIVE_U_PRCI select UNIMP
@@ -38,6 +40,7 @@ config SPIKE select HTIF select SIFIVE select SIFIVE_CLINT + select SIFIVE_PLIC config OPENTITAN bool
@@ -58,6 +61,7 @@ config RISCV_VIRT select PFLASH_CFI01 select SIFIVE select SIFIVE_CLINT + select SIFIVE_PLIC config MICROCHIP_PFSOC bool
@@ -67,4 +71,5 @@ config MICROCHIP_PFSOC select UNIMP select MCHP_PFSOC_MMUART select SIFIVE_PDMA + select SIFIVE_PLIC select CADENCE_SDHCI
hw/riscv/meson.build +0 -1
@@ -4,7 +4,6 @@ riscv_ss.add(files('numa.c')) 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_RISCV_VIRT', if_true: files('virt.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.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'))
Signature · 1 line
2.7.4
Re: [PATCH 06/12] hw/riscv: Move sifive_plic model to hw/intc
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
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_plicmodel to hw/intc directory.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 186 lines
---
{include/hw/riscv => hw/intc}/sifive_plic.h | 0 hw/{riscv => intc}/sifive_plic.c | 2 +- hw/riscv/microchip_pfsoc.c | 2 +- hw/riscv/sifive_e.c | 2 +- hw/riscv/sifive_u.c | 2 +- hw/riscv/virt.c | 2 +- hw/intc/Kconfig | 3 +++ hw/intc/meson.build | 1 + hw/riscv/Kconfig | 5 +++++ hw/riscv/meson.build | 1 - 10 files changed, 14 insertions(+), 6 deletions(-) rename {include/hw/riscv => hw/intc}/sifive_plic.h (100%) rename hw/{riscv => intc}/sifive_plic.c (99%)hw/intc/sifive_plic.h renamed from include/hw/riscv/sifive_plic.h +0
-0hw/intc/sifive_plic.c renamed from hw/riscv/sifive_plic.c +1
-1@@ -27,9 +27,9 @@#include "hw/pci/msi.h" #include "hw/boards.h" #include "hw/qdev-properties.h" +#include "hw/intc/sifive_plic.h" #include "target/riscv/cpu.h" #include "sysemu/sysemu.h" -#include "hw/riscv/sifive_plic.h" #define RISCV_DEBUG_PLIC 0hw/riscv/microchip_pfsoc.c +1
-1@@ -48,9 +48,9 @@#include "hw/misc/unimp.h" #include "hw/riscv/boot.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_plic.h" #include "hw/riscv/microchip_pfsoc.h" #include "hw/intc/sifive_clint.h" +#include "hw/intc/sifive_plic.h" #include "sysemu/sysemu.h" /* hw/riscv/sifive_e.c +1
-1@@ -39,11 +39,11 @@#include "hw/misc/unimp.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_plic.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_e.h" #include "hw/riscv/boot.h" #include "hw/intc/sifive_clint.h" +#include "hw/intc/sifive_plic.h" #include "hw/misc/sifive_e_prci.h" #include "chardev/char.h" #include "sysemu/arch_init.h" hw/riscv/sifive_u.c +1
-1@@ -46,11 +46,11 @@#include "hw/misc/unimp.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_plic.h" #include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_u.h" #include "hw/riscv/boot.h" #include "hw/intc/sifive_clint.h" +#include "hw/intc/sifive_plic.h" #include "chardev/char.h" #include "net/eth.h" #include "sysemu/arch_init.h" hw/riscv/virt.c +1
-1@@ -30,12 +30,12 @@#include "hw/char/serial.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_plic.h" #include "hw/riscv/sifive_test.h" #include "hw/riscv/virt.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" #include "hw/intc/sifive_clint.h" +#include "hw/intc/sifive_plic.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h" hw/intc/Kconfig +3
-0@@ -70,3 +70,6 @@ config LOONGSON_LIOINTC config SIFIVE_CLINT bool + +config SIFIVE_PLIC + boolhw/intc/meson.build +1
-0@@ -48,6 +48,7 @@ specific_ss.add(when: 'CONFIG_S390_FLIC', if_true: files('s390_flic.c')) specific_ss.add(when: 'CONFIG_S390_FLIC_KVM', if_true: files('s390_flic_kvm.c')) specific_ss.add(when: 'CONFIG_SH4', if_true: files('sh_intc.c')) specific_ss.add(when: 'CONFIG_SIFIVE_CLINT', if_true: files('sifive_clint.c')) +specific_ss.add(when: 'CONFIG_SIFIVE_PLIC', if_true: files('sifive_plic.c')) specific_ss.add(when: 'CONFIG_XICS', if_true: files('xics.c')) specific_ss.add(when: 'CONFIG_XICS_KVM', if_true: files('xics_kvm.c')) specific_ss.add(when: 'CONFIG_XICS_SPAPR', if_true: files('xics_spapr.c'))hw/riscv/Kconfig +5
-0@@ -17,6 +17,7 @@ config SIFIVE_E select SIFIVE select SIFIVE_CLINT select SIFIVE_GPIO + select SIFIVE_PLIC select SIFIVE_E_PRCI select UNIMP@@ -28,6 +29,7 @@ config SIFIVE_U select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PDMA + select SIFIVE_PLIC select SIFIVE_U_OTP select SIFIVE_U_PRCI select UNIMP@@ -38,6 +40,7 @@ config SPIKE select HTIF select SIFIVE select SIFIVE_CLINT + select SIFIVE_PLIC config OPENTITAN bool@@ -58,6 +61,7 @@ config RISCV_VIRT select PFLASH_CFI01 select SIFIVE select SIFIVE_CLINT + select SIFIVE_PLIC config MICROCHIP_PFSOC bool@@ -67,4 +71,5 @@ config MICROCHIP_PFSOC select UNIMP select MCHP_PFSOC_MMUART select SIFIVE_PDMA + select SIFIVE_PLIC select CADENCE_SDHCIhw/riscv/meson.build +0
-2@@ -4,7 +4,6 @@ riscv_ss.add(files('numa.c')) 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_RISCV_VIRT', if_true: files('virt.c')) -riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.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')) --2.7.4
PATCH 7/12 hw/riscv: Move riscv_htif model to hw/char
In reply to Bin MengFrom: Bin Meng <[email protected]>
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 riscv_htif model to hw/char directory.
---
include/hw/{riscv => char}/riscv_htif.h | 0
hw/{riscv => char}/riscv_htif.c | 2 +-
hw/riscv/spike.c | 2 +-
hw/char/Kconfig | 3 +++
hw/char/meson.build | 1 +
hw/riscv/Kconfig | 3 ---
hw/riscv/meson.build | 1 -
7 files changed, 6 insertions(+), 6 deletions(-)
rename include/hw/{riscv => char}/riscv_htif.h (100%)
rename hw/{riscv => char}/riscv_htif.c (99%)include/hw/char/riscv_htif.h renamed from include/hw/riscv/riscv_htif.h +0 -0
hw/char/riscv_htif.c renamed from hw/riscv/riscv_htif.c +1 -1
@@ -24,10 +24,10 @@#include "qapi/error.h" #include "qemu/log.h" #include "hw/sysbus.h" +#include "hw/char/riscv_htif.h" #include "hw/char/serial.h" #include "chardev/char.h" #include "chardev/char-fe.h" -#include "hw/riscv/riscv_htif.h" #include "qemu/timer.h" #include "qemu/error-report.h"
hw/riscv/spike.c +1 -1
@@ -31,11 +31,11 @@#include "hw/loader.h" #include "hw/sysbus.h" #include "target/riscv/cpu.h" -#include "hw/riscv/riscv_htif.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/spike.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" +#include "hw/char/riscv_htif.h" #include "hw/intc/sifive_clint.h" #include "chardev/char.h" #include "sysemu/arch_init.h"
hw/char/Kconfig +3 -0
@@ -1,6 +1,9 @@ config ESCC bool +config HTIF + bool + config PARALLEL bool default y
hw/char/meson.build +1 -0
@@ -34,6 +34,7 @@ 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_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c')) +specific_ss.add(when: 'CONFIG_HTIF', if_true: files('riscv_htif.c')) specific_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('terminal3270.c')) specific_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-serial-bus.c')) specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_vty.c'))
hw/riscv/Kconfig +0 -3
@@ -1,6 +1,3 @@ -config HTIF - bool - config HART bool
hw/riscv/meson.build +0 -1
@@ -8,7 +8,6 @@ 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_U', if_true: files('sifive_u.c')) -riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('riscv_htif.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c')) riscv_ss.add(when: 'CONFIG_MICROCHIP_PFSOC', if_true: files('microchip_pfsoc.c'))
Signature · 1 line
2.7.4
Re: [PATCH 07/12] hw/riscv: Move riscv_htif model to hw/char
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
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
riscv_htifmodel to hw/char directory.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 106 lines
---
include/hw/{riscv => char}/riscv_htif.h | 0 hw/{riscv => char}/riscv_htif.c | 2 +- hw/riscv/spike.c | 2 +- hw/char/Kconfig | 3 +++ hw/char/meson.build | 1 + hw/riscv/Kconfig | 3 --- hw/riscv/meson.build | 1 - 7 files changed, 6 insertions(+), 6 deletions(-) rename include/hw/{riscv => char}/riscv_htif.h (100%) rename hw/{riscv => char}/riscv_htif.c (99%)include/hw/char/riscv_htif.h renamed from include/hw/riscv/riscv_htif.h +0
-0hw/char/riscv_htif.c renamed from hw/riscv/riscv_htif.c +1
-1@@ -24,10 +24,10 @@#include "qapi/error.h" #include "qemu/log.h" #include "hw/sysbus.h" +#include "hw/char/riscv_htif.h" #include "hw/char/serial.h" #include "chardev/char.h" #include "chardev/char-fe.h" -#include "hw/riscv/riscv_htif.h" #include "qemu/timer.h" #include "qemu/error-report.h" hw/riscv/spike.c +1
-1@@ -31,11 +31,11 @@#include "hw/loader.h" #include "hw/sysbus.h" #include "target/riscv/cpu.h" -#include "hw/riscv/riscv_htif.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/spike.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" +#include "hw/char/riscv_htif.h" #include "hw/intc/sifive_clint.h" #include "chardev/char.h" #include "sysemu/arch_init.h" hw/char/Kconfig +3
-0@@ -1,6 +1,9 @@ config ESCC bool +config HTIF + bool + config PARALLEL bool default yhw/char/meson.build +1
-0@@ -34,6 +34,7 @@ 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_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c')) +specific_ss.add(when: 'CONFIG_HTIF', if_true: files('riscv_htif.c')) specific_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('terminal3270.c')) specific_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-serial-bus.c')) specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_vty.c'))hw/riscv/Kconfig +0
-3@@ -1,6 +1,3 @@ -config HTIF - bool - config HART boolhw/riscv/meson.build +0
-2@@ -8,7 +8,6 @@ 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_U', if_true: files('sifive_u.c')) -riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('riscv_htif.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c')) riscv_ss.add(when: 'CONFIG_MICROCHIP_PFSOC', if_true: files('microchip_pfsoc.c')) --2.7.4
PATCH 8/12 hw/riscv: Move sifive_uart model to hw/char
In reply to Bin MengFrom: Bin Meng <[email protected]>
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.
---
include/hw/{riscv => char}/sifive_uart.h | 0
hw/{riscv => char}/sifive_uart.c | 2 +-
hw/riscv/sifive_e.c | 2 +-
hw/riscv/sifive_u.c | 2 +-
hw/char/Kconfig | 3 +++
hw/char/meson.build | 1 +
hw/riscv/Kconfig | 2 ++
hw/riscv/meson.build | 1 -
8 files changed, 9 insertions(+), 4 deletions(-)
rename include/hw/{riscv => char}/sifive_uart.h (100%)
rename hw/{riscv => char}/sifive_uart.c (99%)include/hw/char/sifive_uart.h renamed from include/hw/riscv/sifive_uart.h +0 -0
hw/char/sifive_uart.c renamed from hw/riscv/sifive_uart.c +1 -1
@@ -24,7 +24,7 @@#include "chardev/char-fe.h" #include "hw/hw.h" #include "hw/irq.h" -#include "hw/riscv/sifive_uart.h" +#include "hw/char/sifive_uart.h" /* * Not yet implemented:
hw/riscv/sifive_e.c +1 -1
@@ -39,9 +39,9 @@#include "hw/misc/unimp.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_e.h" #include "hw/riscv/boot.h" +#include "hw/char/sifive_uart.h" #include "hw/intc/sifive_clint.h" #include "hw/intc/sifive_plic.h" #include "hw/misc/sifive_e_prci.h"
hw/riscv/sifive_u.c +1 -1
@@ -46,9 +46,9 @@#include "hw/misc/unimp.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_u.h" #include "hw/riscv/boot.h" +#include "hw/char/sifive_uart.h" #include "hw/intc/sifive_clint.h" #include "hw/intc/sifive_plic.h" #include "chardev/char.h"
hw/char/Kconfig +3 -0
@@ -58,3 +58,6 @@ config AVR_USART config MCHP_PFSOC_MMUART bool + +config SIFIVE_UART + bool
hw/char/meson.build +1 -0
@@ -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_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_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_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c')) softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c'))
hw/riscv/Kconfig +2 -0
@@ -15,6 +15,7 @@ config SIFIVE_E select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PLIC + select SIFIVE_UART select SIFIVE_E_PRCI select UNIMP
@@ -27,6 +28,7 @@ config SIFIVE_U select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_PLIC + select SIFIVE_UART select SIFIVE_U_OTP select SIFIVE_U_PRCI select UNIMP
hw/riscv/meson.build +0 -1
@@ -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_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_uart.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_SPIKE', if_true: files('spike.c'))
Signature · 1 line
2.7.4
Re: [PATCH 08/12] hw/riscv: Move sifive_uart model to hw/char
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
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_uartmodel to hw/char directory.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 123 lines
---
include/hw/{riscv => char}/sifive_uart.h | 0 hw/{riscv => char}/sifive_uart.c | 2 +- hw/riscv/sifive_e.c | 2 +- hw/riscv/sifive_u.c | 2 +- hw/char/Kconfig | 3 +++ hw/char/meson.build | 1 + hw/riscv/Kconfig | 2 ++ hw/riscv/meson.build | 1 - 8 files changed, 9 insertions(+), 4 deletions(-) rename include/hw/{riscv => char}/sifive_uart.h (100%) rename hw/{riscv => char}/sifive_uart.c (99%)include/hw/char/sifive_uart.h renamed from include/hw/riscv/sifive_uart.h +0
-0hw/char/sifive_uart.c renamed from hw/riscv/sifive_uart.c +1
-1@@ -24,7 +24,7 @@#include "chardev/char-fe.h" #include "hw/hw.h" #include "hw/irq.h" -#include "hw/riscv/sifive_uart.h" +#include "hw/char/sifive_uart.h" /* * Not yet implemented: hw/riscv/sifive_e.c +1
-1@@ -39,9 +39,9 @@#include "hw/misc/unimp.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_e.h" #include "hw/riscv/boot.h" +#include "hw/char/sifive_uart.h" #include "hw/intc/sifive_clint.h" #include "hw/intc/sifive_plic.h" #include "hw/misc/sifive_e_prci.h" hw/riscv/sifive_u.c +1
-1@@ -46,9 +46,9 @@#include "hw/misc/unimp.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_uart.h" #include "hw/riscv/sifive_u.h" #include "hw/riscv/boot.h" +#include "hw/char/sifive_uart.h" #include "hw/intc/sifive_clint.h" #include "hw/intc/sifive_plic.h" #include "chardev/char.h" hw/char/Kconfig +3
-0@@ -58,3 +58,6 @@ config AVR_USART config MCHP_PFSOC_MMUART bool + +config SIFIVE_UART + boolhw/char/meson.build +1
-0@@ -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_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_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_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c')) softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c'))hw/riscv/Kconfig +2
-0@@ -15,6 +15,7 @@ config SIFIVE_E select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PLIC + select SIFIVE_UART select SIFIVE_E_PRCI select UNIMP@@ -27,6 +28,7 @@ config SIFIVE_U select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_PLIC + select SIFIVE_UART select SIFIVE_U_OTP select SIFIVE_U_PRCI select UNIMPhw/riscv/meson.build +0
-2@@ -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_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_uart.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_SPIKE', if_true: files('spike.c')) --2.7.4
PATCH 9/12 hw/riscv: Move sifive_test model to hw/misc
In reply to Bin MengFrom: Bin Meng <[email protected]>
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_test model to hw/misc directory.
---
include/hw/{riscv => misc}/sifive_test.h | 0
hw/{riscv => misc}/sifive_test.c | 2 +-
hw/riscv/virt.c | 2 +-
hw/misc/Kconfig | 3 +++
hw/misc/meson.build | 1 +
hw/riscv/Kconfig | 1 +
hw/riscv/meson.build | 1 -
7 files changed, 7 insertions(+), 3 deletions(-)
rename include/hw/{riscv => misc}/sifive_test.h (100%)
rename hw/{riscv => misc}/sifive_test.c (98%)include/hw/misc/sifive_test.h renamed from include/hw/riscv/sifive_test.h +0 -0
hw/misc/sifive_test.c renamed from hw/riscv/sifive_test.c +1 -1
@@ -25,7 +25,7 @@#include "qemu/module.h" #include "sysemu/runstate.h" #include "hw/hw.h" -#include "hw/riscv/sifive_test.h" +#include "hw/misc/sifive_test.h" static uint64_t sifive_test_read (void *opaque,hwaddr addr,unsigned int size) {
hw/riscv/virt.c +1 -1
@@ -30,12 +30,12 @@#include "hw/char/serial.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_test.h" #include "hw/riscv/virt.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" #include "hw/intc/sifive_clint.h" #include "hw/intc/sifive_plic.h" +#include "hw/misc/sifive_test.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h"
hw/misc/Kconfig +3 -0
@@ -134,6 +134,9 @@ config MAC_VIA config AVR_POWER bool +config SIFIVE_TEST + bool + config SIFIVE_E_PRCI bool
hw/misc/meson.build +1 -0
@@ -22,6 +22,7 @@ softmmu_ss.add(when: 'CONFIG_ARM11SCU', if_true: files('arm11scu.c')) softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c')) # RISC-V devices +softmmu_ss.add(when: 'CONFIG_SIFIVE_TEST', if_true: files('sifive_test.c')) softmmu_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c')) softmmu_ss.add(when: 'CONFIG_SIFIVE_U_OTP', if_true: files('sifive_u_otp.c')) softmmu_ss.add(when: 'CONFIG_SIFIVE_U_PRCI', if_true: files('sifive_u_prci.c'))
hw/riscv/Kconfig +1 -0
@@ -61,6 +61,7 @@ config RISCV_VIRT select SIFIVE select SIFIVE_CLINT select SIFIVE_PLIC + select SIFIVE_TEST config MICROCHIP_PFSOC bool
hw/riscv/meson.build +0 -1
@@ -4,7 +4,6 @@ riscv_ss.add(files('numa.c')) 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_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_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_SPIKE', if_true: files('spike.c'))
Signature · 1 line
2.7.4
Re: [PATCH 09/12] hw/riscv: Move sifive_test model to hw/misc
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
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_testmodel to hw/misc directory.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 105 lines
---
include/hw/{riscv => misc}/sifive_test.h | 0 hw/{riscv => misc}/sifive_test.c | 2 +- hw/riscv/virt.c | 2 +- hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 1 + hw/riscv/Kconfig | 1 + hw/riscv/meson.build | 1 - 7 files changed, 7 insertions(+), 3 deletions(-) rename include/hw/{riscv => misc}/sifive_test.h (100%) rename hw/{riscv => misc}/sifive_test.c (98%)include/hw/misc/sifive_test.h renamed from include/hw/riscv/sifive_test.h +0
-0hw/misc/sifive_test.c renamed from hw/riscv/sifive_test.c +1
-1@@ -25,7 +25,7 @@#include "qemu/module.h" #include "sysemu/runstate.h" #include "hw/hw.h" -#include "hw/riscv/sifive_test.h" +#include "hw/misc/sifive_test.h" static uint64_t sifive_test_read (void *opaque,hwaddr addr,unsigned int size) {hw/riscv/virt.c +1
-1@@ -30,12 +30,12 @@#include "hw/char/serial.h" #include "target/riscv/cpu.h" #include "hw/riscv/riscv_hart.h" -#include "hw/riscv/sifive_test.h" #include "hw/riscv/virt.h" #include "hw/riscv/boot.h" #include "hw/riscv/numa.h" #include "hw/intc/sifive_clint.h" #include "hw/intc/sifive_plic.h" +#include "hw/misc/sifive_test.h" #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h" hw/misc/Kconfig +3
-0@@ -134,6 +134,9 @@ config MAC_VIA config AVR_POWER bool +config SIFIVE_TEST + bool + config SIFIVE_E_PRCI boolhw/misc/meson.build +1
-0@@ -22,6 +22,7 @@ softmmu_ss.add(when: 'CONFIG_ARM11SCU', if_true: files('arm11scu.c')) softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c')) # RISC-V devices +softmmu_ss.add(when: 'CONFIG_SIFIVE_TEST', if_true: files('sifive_test.c')) softmmu_ss.add(when: 'CONFIG_SIFIVE_E_PRCI', if_true: files('sifive_e_prci.c')) softmmu_ss.add(when: 'CONFIG_SIFIVE_U_OTP', if_true: files('sifive_u_otp.c')) softmmu_ss.add(when: 'CONFIG_SIFIVE_U_PRCI', if_true: files('sifive_u_prci.c'))hw/riscv/Kconfig +1
-0@@ -61,6 +61,7 @@ config RISCV_VIRT select SIFIVE select SIFIVE_CLINT select SIFIVE_PLIC + select SIFIVE_TEST config MICROCHIP_PFSOC boolhw/riscv/meson.build +0
-2@@ -4,7 +4,6 @@ riscv_ss.add(files('numa.c')) 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_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_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_SPIKE', if_true: files('spike.c')) --2.7.4
PATCH 10/12 hw/riscv: Always build riscv_hart.c
In reply to Bin MengFrom: Bin Meng <[email protected]>
Every RISC-V machine needs riscv_hart hence there is no need to have a dedicated Kconfig option for it. Drop the Kconfig option and always build riscv_hart.c.
---
hw/riscv/Kconfig | 9 --------- hw/riscv/meson.build | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-)
hw/riscv/Kconfig +0 -9
@@ -1,6 +1,3 @@ -config HART - bool - config IBEX bool
@@ -10,7 +7,6 @@ config SIFIVE config SIFIVE_E bool - select HART select SIFIVE select SIFIVE_CLINT select SIFIVE_GPIO
@@ -22,7 +18,6 @@ config SIFIVE_E config SIFIVE_U bool select CADENCE - select HART select SIFIVE select SIFIVE_CLINT select SIFIVE_GPIO
@@ -35,7 +30,6 @@ config SIFIVE_U config SPIKE bool - select HART select HTIF select SIFIVE select SIFIVE_CLINT
@@ -44,7 +38,6 @@ config SPIKE config OPENTITAN bool select IBEX - select HART select UNIMP config RISCV_VIRT
@@ -52,7 +45,6 @@ config RISCV_VIRT imply PCI_DEVICES imply TEST_DEVICES select PCI - select HART select SERIAL select GOLDFISH_RTC select VIRTIO_MMIO
@@ -65,7 +57,6 @@ config RISCV_VIRT config MICROCHIP_PFSOC bool - select HART select SIFIVE select SIFIVE_CLINT select UNIMP
hw/riscv/meson.build +1 -1
@@ -1,7 +1,7 @@ riscv_ss = ss.source_set() riscv_ss.add(files('boot.c')) riscv_ss.add(files('numa.c')) -riscv_ss.add(when: 'CONFIG_HART', if_true: files('riscv_hart.c')) +riscv_ss.add(files('riscv_hart.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_SIFIVE_E', if_true: files('sifive_e.c'))
Signature · 1 line
2.7.4
Re: [PATCH 10/12] hw/riscv: Always build riscv_hart.c
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
Every RISC-V machine needs
riscv_harthence there is no need to have a dedicatedKconfigoption for it. Drop theKconfigoption and always buildriscv_hart.c.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 82 lines
---
hw/riscv/Kconfig | 9 --------- hw/riscv/meson.build | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-)hw/riscv/Kconfig +0
-9@@ -1,6 +1,3 @@ -config HART - bool - config IBEX bool@@ -10,7 +7,6 @@ config SIFIVE config SIFIVE_E bool - select HART select SIFIVE select SIFIVE_CLINT select SIFIVE_GPIO@@ -22,7 +18,6 @@ config SIFIVE_E config SIFIVE_U bool select CADENCE - select HART select SIFIVE select SIFIVE_CLINT select SIFIVE_GPIO@@ -35,7 +30,6 @@ config SIFIVE_U config SPIKE bool - select HART select HTIF select SIFIVE select SIFIVE_CLINT@@ -44,7 +38,6 @@ config SPIKE config OPENTITAN bool select IBEX - select HART select UNIMP config RISCV_VIRT@@ -52,7 +45,6 @@ config RISCV_VIRT imply PCI_DEVICES imply TEST_DEVICES select PCI - select HART select SERIAL select GOLDFISH_RTC select VIRTIO_MMIO@@ -65,7 +57,6 @@ config RISCV_VIRT config MICROCHIP_PFSOC bool - select HART select SIFIVE select SIFIVE_CLINT select UNIMPhw/riscv/meson.build +1
-2@@ -1,7 +1,7 @@ riscv_ss = ss.source_set() riscv_ss.add(files('boot.c')) riscv_ss.add(files('numa.c')) -riscv_ss.add(when: 'CONFIG_HART', if_true: files('riscv_hart.c')) +riscv_ss.add(files('riscv_hart.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_SIFIVE_E', if_true: files('sifive_e.c')) --2.7.4
PATCH 11/12 hw/riscv: Drop CONFIG_SIFIVE
In reply to Bin MengFrom: Bin Meng <[email protected]>
The name SIFIVE is too vague to convey the required component of MSI_NONBROKEN. Let's drop the option, and select MSI_NONBROKEN in each machine instead.
---
hw/riscv/Kconfig | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
hw/riscv/Kconfig +5 -9
@@ -1,13 +1,9 @@ config IBEX bool -config SIFIVE - bool - select MSI_NONBROKEN - config SIFIVE_E bool - select SIFIVE + select MSI_NONBROKEN select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PLIC
@@ -18,7 +14,7 @@ config SIFIVE_E config SIFIVE_U bool select CADENCE - select SIFIVE + select MSI_NONBROKEN select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PDMA
@@ -31,7 +27,7 @@ config SIFIVE_U config SPIKE bool select HTIF - select SIFIVE + select MSI_NONBROKEN select SIFIVE_CLINT select SIFIVE_PLIC
@@ -44,20 +40,20 @@ config RISCV_VIRT bool imply PCI_DEVICES imply TEST_DEVICES + select MSI_NONBROKEN select PCI select SERIAL select GOLDFISH_RTC select VIRTIO_MMIO select PCI_EXPRESS_GENERIC_BRIDGE select PFLASH_CFI01 - select SIFIVE select SIFIVE_CLINT select SIFIVE_PLIC select SIFIVE_TEST config MICROCHIP_PFSOC bool - select SIFIVE + select MSI_NONBROKEN select SIFIVE_CLINT select UNIMP select MCHP_PFSOC_MMUART
Signature · 1 line
2.7.4
Re: [PATCH 11/12] hw/riscv: Drop CONFIG_SIFIVE
Quoted 8 lines · Bin Meng
From: Bin Meng <[email protected]>
The name SIFIVE is too vague to convey the required component of
MSI_NONBROKEN. Let's drop the option, and selectMSI_NONBROKENin each machine instead.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 69 lines
---
hw/riscv/Kconfig | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)hw/riscv/Kconfig +5
-10@@ -1,13 +1,9 @@ config IBEX bool -config SIFIVE - bool - select MSI_NONBROKEN - config SIFIVE_E bool - select SIFIVE + select MSI_NONBROKEN select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PLIC@@ -18,7 +14,7 @@ config SIFIVE_E config SIFIVE_U bool select CADENCE - select SIFIVE + select MSI_NONBROKEN select SIFIVE_CLINT select SIFIVE_GPIO select SIFIVE_PDMA@@ -31,7 +27,7 @@ config SIFIVE_U config SPIKE bool select HTIF - select SIFIVE + select MSI_NONBROKEN select SIFIVE_CLINT select SIFIVE_PLIC@@ -44,20 +40,20 @@ config RISCV_VIRT bool imply PCI_DEVICES imply TEST_DEVICES + select MSI_NONBROKEN select PCI select SERIAL select GOLDFISH_RTC select VIRTIO_MMIO select PCI_EXPRESS_GENERIC_BRIDGE select PFLASH_CFI01 - select SIFIVE select SIFIVE_CLINT select SIFIVE_PLIC select SIFIVE_TEST config MICROCHIP_PFSOC bool - select SIFIVE + select MSI_NONBROKEN select SIFIVE_CLINT select UNIMP select MCHP_PFSOC_MMUART --2.7.4
PATCH 12/12 hw/riscv: Sort the Kconfig options in alphabetical order
In reply to Bin MengFrom: Bin Meng <[email protected]>
At present the Kconfig file is in disorder. Let's sort the options.
---
hw/riscv/Kconfig | 58 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-)
hw/riscv/Kconfig +29 -29
@@ -1,36 +1,16 @@ config IBEX bool -config SIFIVE_E - bool - select MSI_NONBROKEN - select SIFIVE_CLINT - select SIFIVE_GPIO - select SIFIVE_PLIC - select SIFIVE_UART - select SIFIVE_E_PRCI - select UNIMP - -config SIFIVE_U +config MICROCHIP_PFSOC bool - select CADENCE + select CADENCE_SDHCI + select MCHP_PFSOC_MMUART select MSI_NONBROKEN select SIFIVE_CLINT - select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_PLIC - select SIFIVE_UART - select SIFIVE_U_OTP - select SIFIVE_U_PRCI select UNIMP -config SPIKE - bool - select HTIF - select MSI_NONBROKEN - select SIFIVE_CLINT - select SIFIVE_PLIC - config OPENTITAN bool select IBEX
@@ -40,23 +20,43 @@ config RISCV_VIRT bool imply PCI_DEVICES imply TEST_DEVICES + select GOLDFISH_RTC select MSI_NONBROKEN select PCI - select SERIAL - select GOLDFISH_RTC - select VIRTIO_MMIO select PCI_EXPRESS_GENERIC_BRIDGE select PFLASH_CFI01 + select SERIAL select SIFIVE_CLINT select SIFIVE_PLIC select SIFIVE_TEST + select VIRTIO_MMIO -config MICROCHIP_PFSOC +config SIFIVE_E bool select MSI_NONBROKEN select SIFIVE_CLINT + select SIFIVE_GPIO + select SIFIVE_PLIC + select SIFIVE_UART + select SIFIVE_E_PRCI select UNIMP - select MCHP_PFSOC_MMUART + +config SIFIVE_U + bool + select CADENCE + select MSI_NONBROKEN + select SIFIVE_CLINT + select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_PLIC - select CADENCE_SDHCI + select SIFIVE_UART + select SIFIVE_U_OTP + select SIFIVE_U_PRCI + select UNIMP + +config SPIKE + bool + select HTIF + select MSI_NONBROKEN + select SIFIVE_CLINT + select SIFIVE_PLIC
Signature · 1 line
2.7.4
Re: [PATCH 12/12] hw/riscv: Sort the Kconfig options in alphabetical order
Quoted 6 lines · Bin Meng
From: Bin Meng <[email protected]>
At present the
Kconfigfile is in disorder. Let's sort the options.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 104 lines
---
hw/riscv/Kconfig | 58 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-)hw/riscv/Kconfig +29
-30@@ -1,36 +1,16 @@ config IBEX bool -config SIFIVE_E - bool - select MSI_NONBROKEN - select SIFIVE_CLINT - select SIFIVE_GPIO - select SIFIVE_PLIC - select SIFIVE_UART - select SIFIVE_E_PRCI - select UNIMP - -config SIFIVE_U +config MICROCHIP_PFSOC bool - select CADENCE + select CADENCE_SDHCI + select MCHP_PFSOC_MMUART select MSI_NONBROKEN select SIFIVE_CLINT - select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_PLIC - select SIFIVE_UART - select SIFIVE_U_OTP - select SIFIVE_U_PRCI select UNIMP -config SPIKE - bool - select HTIF - select MSI_NONBROKEN - select SIFIVE_CLINT - select SIFIVE_PLIC - config OPENTITAN bool select IBEX@@ -40,23 +20,43 @@ config RISCV_VIRT bool imply PCI_DEVICES imply TEST_DEVICES + select GOLDFISH_RTC select MSI_NONBROKEN select PCI - select SERIAL - select GOLDFISH_RTC - select VIRTIO_MMIO select PCI_EXPRESS_GENERIC_BRIDGE select PFLASH_CFI01 + select SERIAL select SIFIVE_CLINT select SIFIVE_PLIC select SIFIVE_TEST + select VIRTIO_MMIO -config MICROCHIP_PFSOC +config SIFIVE_E bool select MSI_NONBROKEN select SIFIVE_CLINT + select SIFIVE_GPIO + select SIFIVE_PLIC + select SIFIVE_UART + select SIFIVE_E_PRCI select UNIMP - select MCHP_PFSOC_MMUART + +config SIFIVE_U + bool + select CADENCE + select MSI_NONBROKEN + select SIFIVE_CLINT + select SIFIVE_GPIO select SIFIVE_PDMA select SIFIVE_PLIC - select CADENCE_SDHCI + select SIFIVE_UART + select SIFIVE_U_OTP + select SIFIVE_U_PRCI + select UNIMP + +config SPIKE + bool + select HTIF + select MSI_NONBROKEN + select SIFIVE_CLINT + select SIFIVE_PLIC --2.7.4
Quoted 7 lines · Bin Meng
From: Bin Meng <[email protected]>
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. Peripheral models for a specific SoC are moved to its corresponding hw/* subdirectories.
Ah, thanks for taking on this cleanup -- it's been something that was unfortunately missed in code review for the initial riscv work that we never got round to fixing later, so it's nice to see things being moved into their proper places.
thanks
-- PMM
Alistair Francis
AppliedQuoted 12 lines · Bin Meng
From: Bin Meng <[email protected]>
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. Peripheral models for a specific SoC are moved to its corresponding hw/* subdirectories.
This series should be applied after the PolarFire SoC series:
http://patchwork.ozlabs.org/project/qemu-devel/list/?series=198727
Quoted 13 lines
Bin Meng (12):
hw/riscv: Movesifive_e_prcimodel to hw/misc hw/riscv: Movesifive_u_prcimodel to hw/misc hw/riscv: Movesifive_u_otpmodel to hw/misc hw/riscv: Movesifive_gpiomodel to hw/gpio hw/riscv: Movesifive_clintmodel to hw/intc hw/riscv: Movesifive_plicmodel to hw/intc hw/riscv: Moveriscv_htifmodel to hw/char hw/riscv: Movesifive_uartmodel to hw/char hw/riscv: Movesifive_testmodel to hw/misc hw/riscv: Always buildriscv_hart.c
hw/riscv: DropCONFIG_SIFIVE
hw/riscv: Sort theKconfigoptions in alphabetical order
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 66 lines
{include/hw/riscv => hw/intc}/sifive_plic.h | 0 hw/riscv/trace.h | 1 - include/hw/{riscv => char}/riscv_htif.h | 0 include/hw/{riscv => char}/sifive_uart.h | 0 include/hw/{riscv => gpio}/sifive_gpio.h | 0 include/hw/{riscv => intc}/sifive_clint.h | 0 include/hw/{riscv => misc}/sifive_e_prci.h | 0 include/hw/{riscv => misc}/sifive_test.h | 0 include/hw/{riscv => misc}/sifive_u_otp.h | 0 include/hw/{riscv => misc}/sifive_u_prci.h | 0 include/hw/riscv/sifive_e.h | 2 +- include/hw/riscv/sifive_u.h | 6 +-- hw/{riscv => char}/riscv_htif.c | 2 +- hw/{riscv => char}/sifive_uart.c | 2 +- hw/{riscv => gpio}/sifive_gpio.c | 2 +- hw/{riscv => intc}/sifive_clint.c | 2 +- hw/{riscv => intc}/sifive_plic.c | 2 +- hw/{riscv => misc}/sifive_e_prci.c | 2 +- hw/{riscv => misc}/sifive_test.c | 2 +- hw/{riscv => misc}/sifive_u_otp.c | 2 +- hw/{riscv => misc}/sifive_u_prci.c | 2 +- hw/riscv/microchip_pfsoc.c | 4 +- hw/riscv/sifive_e.c | 8 ++-- hw/riscv/sifive_u.c | 6 +-- hw/riscv/spike.c | 4 +- hw/riscv/virt.c | 6 +-- hw/char/Kconfig | 6 +++ hw/char/meson.build | 2 + hw/gpio/Kconfig | 3 ++ hw/gpio/meson.build | 1 + hw/gpio/trace-events | 6 +++ hw/intc/Kconfig | 6 +++ hw/intc/meson.build | 2 + hw/misc/Kconfig | 12 +++++ hw/misc/meson.build | 6 +++ hw/riscv/Kconfig | 74 +++++++++++++++-------------- hw/riscv/meson.build | 11 +---- hw/riscv/trace-events | 7 --- meson.build | 1 - 39 files changed, 110 insertions(+), 82 deletions(-) rename {include/hw/riscv => hw/intc}/sifive_plic.h (100%) delete mode 100644 hw/riscv/trace.h rename include/hw/{riscv => char}/riscv_htif.h (100%) rename include/hw/{riscv => char}/sifive_uart.h (100%) rename include/hw/{riscv => gpio}/sifive_gpio.h (100%) rename include/hw/{riscv => intc}/sifive_clint.h (100%) rename include/hw/{riscv => misc}/sifive_e_prci.h (100%) rename include/hw/{riscv => misc}/sifive_test.h (100%) rename include/hw/{riscv => misc}/sifive_u_otp.h (100%) rename include/hw/{riscv => misc}/sifive_u_prci.h (100%) rename hw/{riscv => char}/riscv_htif.c (99%) rename hw/{riscv => char}/sifive_uart.c (99%) rename hw/{riscv => gpio}/sifive_gpio.c (99%) rename hw/{riscv => intc}/sifive_clint.c (99%) rename hw/{riscv => intc}/sifive_plic.c (99%) rename hw/{riscv => misc}/sifive_e_prci.c (99%) rename hw/{riscv => misc}/sifive_test.c (98%) rename hw/{riscv => misc}/sifive_u_otp.c (99%) rename hw/{riscv => misc}/sifive_u_prci.c (99%) delete mode 100644 hw/riscv/trace-events--
2.7.4