mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
f90f2cf7ae
commit
4f1733d4c0
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue