aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2023-06-21 09:53:48 +0100
committerLaurent Vivier <laurent@vivier.eu>2023-06-22 09:28:30 +0200
commit01f35a4f1cfa34a998d0bc11dbdefa7dd26d2c7b (patch)
treecc3e1b6c7133553f253823ca5f0a617abe41cf3f /hw/m68k
parente78d17ca7d1dbfbe0a312e1ed40694d1485c763b (diff)
downloadqemu-01f35a4f1cfa34a998d0bc11dbdefa7dd26d2c7b.zip
qemu-01f35a4f1cfa34a998d0bc11dbdefa7dd26d2c7b.tar.gz
qemu-01f35a4f1cfa34a998d0bc11dbdefa7dd26d2c7b.tar.bz2
q800: move SWIM device to Q800MachineState
Also change the instantiation of the SWIM device to use object_initialize_child(). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20230621085353.113233-20-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/m68k')
-rw-r--r--hw/m68k/q800.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index 9da46f4..50fc7de 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -406,10 +406,12 @@ static void q800_machine_init(MachineState *machine)
/* SWIM floppy controller */
- dev = qdev_new(TYPE_SWIM);
- sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
+ object_initialize_child(OBJECT(machine), "swim", &m->swim,
+ TYPE_SWIM);
+ sysbus = SYS_BUS_DEVICE(&m->swim);
+ sysbus_realize(sysbus, &error_fatal);
memory_region_add_subregion(&m->macio, SWIM_BASE - IO_BASE,
- sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0));
+ sysbus_mmio_get_region(sysbus, 0));
/* NuBus */