aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2023-06-21 09:53:47 +0100
committerLaurent Vivier <laurent@vivier.eu>2023-06-22 09:27:54 +0200
commite78d17ca7d1dbfbe0a312e1ed40694d1485c763b (patch)
tree974b794a701e3943322b68384601f4df538b46ea /hw/m68k
parent1a7a3f004cb9a4913b2a5eb8b1c8dd178db3bee9 (diff)
q800: move ESP device to Q800MachineState
Also change the instantiation of the ESP 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-19-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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index c6314c6bf9..9da46f4456 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -376,8 +376,9 @@ static void q800_machine_init(MachineState *machine)
/* SCSI */
- dev = qdev_new(TYPE_SYSBUS_ESP);
- sysbus_esp = SYSBUS_ESP(dev);
+ object_initialize_child(OBJECT(machine), "esp", &m->esp,
+ TYPE_SYSBUS_ESP);
+ sysbus_esp = SYSBUS_ESP(&m->esp);
esp = &sysbus_esp->esp;
esp->dma_memory_read = NULL;
esp->dma_memory_write = NULL;
@@ -385,8 +386,8 @@ static void q800_machine_init(MachineState *machine)
sysbus_esp->it_shift = 4;
esp->dma_enabled = 1;
- sysbus = SYS_BUS_DEVICE(dev);
- sysbus_realize_and_unref(sysbus, &error_fatal);
+ sysbus = SYS_BUS_DEVICE(&m->esp);
+ sysbus_realize(sysbus, &error_fatal);
/* SCSI and SCSI data IRQs are negative edge triggered */
sysbus_connect_irq(sysbus, 0,
qemu_irq_invert(