aboutsummaryrefslogtreecommitdiff
path: root/hw/mips
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-11-20 13:41:10 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2020-01-07 17:24:29 +0400
commit4f1733d4c0cdc01f6425683df7dffbc69351a323 (patch)
tree7bcc8288526d741c9865fcdb1f40c187d63a4470 /hw/mips
parentf90f2cf7ae77bd85a8439b0abcc05d88c8cc0cb7 (diff)
downloadqemu-4f1733d4c0cdc01f6425683df7dffbc69351a323.zip
qemu-4f1733d4c0cdc01f6425683df7dffbc69351a323.tar.gz
qemu-4f1733d4c0cdc01f6425683df7dffbc69351a323.tar.bz2
mips: use sysbus_add_io()
sysbus devices should use the associated helper function instead of calling memory_region_add_subregion() manually. This simplifies slightly the code. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/mips')
-rw-r--r--hw/mips/mips_mipssim.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
index 3cd0e6e..2c2c7f2 100644
--- a/hw/mips/mips_mipssim.c
+++ b/hw/mips/mips_mipssim.c
@@ -227,8 +227,7 @@ mips_mipssim_init(MachineState *machine)
qdev_set_legacy_instance_id(dev, 0x3f8, 2);
qdev_init_nofail(dev);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, env->irq[4]);
- memory_region_add_subregion(get_system_io(), 0x3f8,
- &SERIAL_IO(dev)->serial.io);
+ sysbus_add_io(SYS_BUS_DEVICE(dev), 0x3f8, &SERIAL_IO(dev)->serial.io);
}
if (nd_table[0].used)