aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2022-04-28 09:41:42 +1000
committerAlistair Francis <alistair.francis@wdc.com>2022-04-29 10:48:26 +1000
commitd24a7bc24ec9201357f554f590d247582360e3cf (patch)
tree194ef12309b7b8c947950665abff6a0e1d5ffa54
parent1c20d3ff6004b600336c52cbef9f134fad3ccd94 (diff)
downloadqemu-d24a7bc24ec9201357f554f590d247582360e3cf.zip
qemu-d24a7bc24ec9201357f554f590d247582360e3cf.tar.gz
qemu-d24a7bc24ec9201357f554f590d247582360e3cf.tar.bz2
hw/core: Move the ARM sysbus-fdt to core
The ARM virt machine currently uses sysbus-fdt to create device tree entries for dynamically created MMIO devices. The RISC-V virt machine can also benefit from this, so move the code to the core directory. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Message-Id: <20220427234146.1130752-3-alistair.francis@opensource.wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
-rw-r--r--hw/arm/meson.build1
-rw-r--r--hw/arm/virt.c2
-rw-r--r--hw/arm/xlnx-versal-virt.c1
-rw-r--r--hw/core/meson.build1
-rw-r--r--hw/core/sysbus-fdt.c (renamed from hw/arm/sysbus-fdt.c)2
-rw-r--r--include/hw/core/sysbus-fdt.h (renamed from include/hw/arm/sysbus-fdt.h)0
6 files changed, 3 insertions, 4 deletions
diff --git a/hw/arm/meson.build b/hw/arm/meson.build
index 721a8eb..122e5dd 100644
--- a/hw/arm/meson.build
+++ b/hw/arm/meson.build
@@ -1,6 +1,5 @@
arm_ss = ss.source_set()
arm_ss.add(files('boot.c'), fdt)
-arm_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('sysbus-fdt.c'))
arm_ss.add(when: 'CONFIG_ARM_VIRT', if_true: files('virt.c'))
arm_ss.add(when: 'CONFIG_ACPI', if_true: files('virt-acpi-build.c'))
arm_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic_boards.c'))
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 5bdd98e..f942789 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -56,7 +56,7 @@
#include "qemu/module.h"
#include "hw/pci-host/gpex.h"
#include "hw/virtio/virtio-pci.h"
-#include "hw/arm/sysbus-fdt.h"
+#include "hw/core/sysbus-fdt.h"
#include "hw/platform-bus.h"
#include "hw/qdev-properties.h"
#include "hw/arm/fdt.h"
diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
index 66a2de7..37fc9b9 100644
--- a/hw/arm/xlnx-versal-virt.c
+++ b/hw/arm/xlnx-versal-virt.c
@@ -15,7 +15,6 @@
#include "sysemu/device_tree.h"
#include "hw/boards.h"
#include "hw/sysbus.h"
-#include "hw/arm/sysbus-fdt.h"
#include "hw/arm/fdt.h"
#include "cpu.h"
#include "hw/qdev-properties.h"
diff --git a/hw/core/meson.build b/hw/core/meson.build
index 0f884d6..7a4d02b 100644
--- a/hw/core/meson.build
+++ b/hw/core/meson.build
@@ -33,6 +33,7 @@ softmmu_ss.add(when: 'CONFIG_PTIMER', if_true: files('ptimer.c'))
softmmu_ss.add(when: 'CONFIG_REGISTER', if_true: files('register.c'))
softmmu_ss.add(when: 'CONFIG_SPLIT_IRQ', if_true: files('split-irq.c'))
softmmu_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('stream.c'))
+softmmu_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('sysbus-fdt.c'))
softmmu_ss.add(files(
'cpu-sysemu.c',
diff --git a/hw/arm/sysbus-fdt.c b/hw/core/sysbus-fdt.c
index 48c5fe9..19d22cb 100644
--- a/hw/arm/sysbus-fdt.c
+++ b/hw/core/sysbus-fdt.c
@@ -27,7 +27,7 @@
#ifdef CONFIG_LINUX
#include <linux/vfio.h>
#endif
-#include "hw/arm/sysbus-fdt.h"
+#include "hw/core/sysbus-fdt.h"
#include "qemu/error-report.h"
#include "sysemu/device_tree.h"
#include "sysemu/tpm.h"
diff --git a/include/hw/arm/sysbus-fdt.h b/include/hw/core/sysbus-fdt.h
index 340c382..340c382 100644
--- a/include/hw/arm/sysbus-fdt.h
+++ b/include/hw/core/sysbus-fdt.h