From 45f569a11666051f98edc678616d135c9feaf506 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Wed, 4 May 2022 10:25:52 +0100 Subject: [PATCH] lasi: move from hw/hppa to hw/misc Move the LASI device implementation from hw/hppa to hw/misc so that it is located with all the other miscellaneous devices. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Message-Id: <20220504092600.10048-43-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland --- MAINTAINERS | 2 ++ hw/hppa/Kconfig | 1 + hw/hppa/machine.c | 2 +- hw/hppa/meson.build | 2 +- hw/hppa/trace-events | 5 ----- hw/misc/Kconfig | 3 +++ hw/{hppa => misc}/lasi.c | 3 +-- hw/misc/meson.build | 3 +++ hw/misc/trace-events | 5 +++++ {hw/hppa => include/hw/misc}/lasi.h | 0 10 files changed, 17 insertions(+), 9 deletions(-) rename hw/{hppa => misc}/lasi.c (99%) rename {hw/hppa => include/hw/misc}/lasi.h (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 59210b093a..662ec47246 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1113,7 +1113,9 @@ S: Odd Fixes F: configs/devices/hppa-softmmu/default.mak F: hw/hppa/ F: hw/net/*i82596* +F: hw/misc/lasi.c F: hw/pci-host/dino.c +F: include/hw/misc/lasi.h F: include/hw/net/lasi_82596.h F: include/hw/pci-host/dino.h F: pc-bios/hppa-firmware.img diff --git a/hw/hppa/Kconfig b/hw/hppa/Kconfig index 724380ecec..5dd8b5b21e 100644 --- a/hw/hppa/Kconfig +++ b/hw/hppa/Kconfig @@ -4,6 +4,7 @@ config HPPA_B160L imply E1000_PCI imply VIRTIO_VGA select DINO + select LASI select SERIAL select ISA_BUS select I8259 diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 9d904b7a60..f3d72b4c35 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -22,7 +22,7 @@ #include "hw/nmi.h" #include "hw/pci/pci.h" #include "hw/pci-host/dino.h" -#include "lasi.h" +#include "hw/misc/lasi.h" #include "hppa_sys.h" #include "qemu/units.h" #include "qapi/error.h" diff --git a/hw/hppa/meson.build b/hw/hppa/meson.build index a6f9db455c..bd5a1fb1d2 100644 --- a/hw/hppa/meson.build +++ b/hw/hppa/meson.build @@ -1,4 +1,4 @@ hppa_ss = ss.source_set() -hppa_ss.add(when: 'CONFIG_HPPA_B160L', if_true: files('pci.c', 'machine.c', 'lasi.c')) +hppa_ss.add(when: 'CONFIG_HPPA_B160L', if_true: files('pci.c', 'machine.c')) hw_arch += {'hppa': hppa_ss} diff --git a/hw/hppa/trace-events b/hw/hppa/trace-events index 871a473771..1a4fbe2fa8 100644 --- a/hw/hppa/trace-events +++ b/hw/hppa/trace-events @@ -2,8 +2,3 @@ # pci.c hppa_pci_iack_write(void) "" - -# lasi.c -lasi_chip_mem_valid(uint64_t addr, uint32_t val) "access to addr 0x%"PRIx64" is %d" -lasi_chip_read(uint64_t addr, uint32_t val) "addr 0x%"PRIx64" val 0x%08x" -lasi_chip_write(uint64_t addr, uint32_t val) "addr 0x%"PRIx64" val 0x%08x" diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig index 507058d8bf..cbabe9f78c 100644 --- a/hw/misc/Kconfig +++ b/hw/misc/Kconfig @@ -171,4 +171,7 @@ config SIFIVE_U_PRCI config VIRT_CTRL bool +config LASI + bool + source macio/Kconfig diff --git a/hw/hppa/lasi.c b/hw/misc/lasi.c similarity index 99% rename from hw/hppa/lasi.c rename to hw/misc/lasi.c index 5ef36f3f58..23a7634a8c 100644 --- a/hw/hppa/lasi.c +++ b/hw/misc/lasi.c @@ -17,10 +17,9 @@ #include "hw/irq.h" #include "sysemu/sysemu.h" #include "sysemu/runstate.h" -#include "hppa_sys.h" #include "migration/vmstate.h" #include "qom/object.h" -#include "lasi.h" +#include "hw/misc/lasi.h" static bool lasi_chip_mem_valid(void *opaque, hwaddr addr, diff --git a/hw/misc/meson.build b/hw/misc/meson.build index 2ff05c7afa..132b7b7344 100644 --- a/hw/misc/meson.build +++ b/hw/misc/meson.build @@ -134,3 +134,6 @@ specific_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_cmgcr.c', 'mips_cp specific_ss.add(when: 'CONFIG_MIPS_ITU', if_true: files('mips_itu.c')) specific_ss.add(when: 'CONFIG_SBSA_REF', if_true: files('sbsa_ec.c')) + +# HPPA devices +softmmu_ss.add(when: 'CONFIG_LASI', if_true: files('lasi.c')) diff --git a/hw/misc/trace-events b/hw/misc/trace-events index 4e0c7973a4..c5e37b0154 100644 --- a/hw/misc/trace-events +++ b/hw/misc/trace-events @@ -263,3 +263,8 @@ virt_ctrl_write(void *dev, unsigned int addr, unsigned int size, uint64_t value) virt_ctrl_reset(void *dev) "ctrl: %p" virt_ctrl_realize(void *dev) "ctrl: %p" virt_ctrl_instance_init(void *dev) "ctrl: %p" + +# lasi.c +lasi_chip_mem_valid(uint64_t addr, uint32_t val) "access to addr 0x%"PRIx64" is %d" +lasi_chip_read(uint64_t addr, uint32_t val) "addr 0x%"PRIx64" val 0x%08x" +lasi_chip_write(uint64_t addr, uint32_t val) "addr 0x%"PRIx64" val 0x%08x" diff --git a/hw/hppa/lasi.h b/include/hw/misc/lasi.h similarity index 100% rename from hw/hppa/lasi.h rename to include/hw/misc/lasi.h