diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-09-22 15:06:59 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-02-22 12:47:40 +0100 |
commit | 0068b069c3ffb9ac8e5ad56bf0c9d853bbfc3997 (patch) | |
tree | 4f242f84e877c71bddfcd0e1eff66b88782b70ed /hw/mips | |
parent | 40f27a785f6b9d238f4b87c17c3ec8329dcde803 (diff) |
hw/sysbus: Inline and remove sysbus_add_io()
sysbus_add_io(...) is a simple wrapper to
memory_region_add_subregion(get_system_io(), ...).
It is used in 3 places; inline it directly.
Rationale: we want to move to an explicit I/O bus,
rather that an implicit one. Besides in heterogeneous
setup we can have more than one I/O bus.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20240216150441.45681-1-philmd@linaro.org>
[PMD: Include missing "exec/address-spaces.h" header]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/mips')
-rw-r--r-- | hw/mips/mipssim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index a12427b6c8..9170d6c474 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -28,6 +28,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/datadir.h" +#include "exec/address-spaces.h" #include "hw/clock.h" #include "hw/mips/mips.h" #include "hw/char/serial.h" @@ -226,7 +227,7 @@ mips_mipssim_init(MachineState *machine) qdev_prop_set_uint8(dev, "endianness", DEVICE_LITTLE_ENDIAN); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, env->irq[4]); - sysbus_add_io(SYS_BUS_DEVICE(dev), 0x3f8, + memory_region_add_subregion(get_system_io(), 0x3f8, sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0)); } |