Skip to content

Commit

Permalink
hw/riscv: Move sifive_e_prci model to hw/misc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lbmeng authored and alistair23 committed Sep 9, 2020
1 parent 834e027 commit 89ece6f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions hw/misc/Kconfig
Expand Up @@ -134,4 +134,7 @@ config MAC_VIA
config AVR_POWER
bool

config SIFIVE_E_PRCI
bool

source macio/Kconfig
3 changes: 3 additions & 0 deletions hw/misc/meson.build
Expand Up @@ -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'))

Expand Down
2 changes: 1 addition & 1 deletion hw/riscv/sifive_e_prci.c → hw/misc/sifive_e_prci.c
Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions hw/riscv/Kconfig
Expand Up @@ -15,6 +15,7 @@ config SIFIVE_E
bool
select HART
select SIFIVE
select SIFIVE_E_PRCI
select UNIMP

config SIFIVE_U
Expand Down
1 change: 0 additions & 1 deletion hw/riscv/meson.build
Expand Up @@ -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'))
Expand Down
2 changes: 1 addition & 1 deletion hw/riscv/sifive_e.c
Expand Up @@ -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"
Expand Down
File renamed without changes.

0 comments on commit 89ece6f

Please sign in to comment.