]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/riscv: Move sifive_e_prci model to hw/misc
authorBin Meng <bin.meng@windriver.com>
Thu, 3 Sep 2020 10:40:12 +0000 (18:40 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 9 Sep 2020 22:54:19 +0000 (15:54 -0700)
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.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <1599129623-68957-2-git-send-email-bmeng.cn@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/misc/Kconfig
hw/misc/meson.build
hw/misc/sifive_e_prci.c [moved from hw/riscv/sifive_e_prci.c with 99% similarity]
hw/riscv/Kconfig
hw/riscv/meson.build
hw/riscv/sifive_e.c
include/hw/misc/sifive_e_prci.h [moved from include/hw/riscv/sifive_e_prci.h with 100% similarity]

index 92c397ca07ad79ddb49baa056c3927114ffc2b79..507398635b74cb57ef4af623e972d32bcd61576c 100644 (file)
@@ -134,4 +134,7 @@ config MAC_VIA
 config AVR_POWER
     bool
 
+config SIFIVE_E_PRCI
+    bool
+
 source macio/Kconfig
index e1576b81cf93b2d5c879e08609ef7559b4760d99..b6b2e5797fbc5497d44e9a3e1d38abeb0945fc2c 100644 (file)
@@ -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'))
 
similarity index 99%
rename from hw/riscv/sifive_e_prci.c
rename to hw/misc/sifive_e_prci.c
index 17dfa74715aaec5e333b91f9200b9adf80076a2a..8ec4ee4b41fc0bce9ce77362ba086496a0b1c185 100644 (file)
@@ -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)
 {
index e53ab1efa561f3ec111899a99499af3d273a97c5..5855e99aaabc8641660c68e53ae5c7919a9f8409 100644 (file)
@@ -15,6 +15,7 @@ config SIFIVE_E
     bool
     select HART
     select SIFIVE
+    select SIFIVE_E_PRCI
     select UNIMP
 
 config SIFIVE_U
index c29a48c3f11450612fc7113bc79c919cd6904810..003994d1ea41064cd8e7cfd76a47d0ff5efefd09 100644 (file)
@@ -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'))
index 36ccfb2071e02fc79032fb820115b1534fd832ad..7f43ed953a5ef7e65a65adfdb4e9202f200aec9b 100644 (file)
@@ -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"