aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2023-06-21 09:53:45 +0100
committerLaurent Vivier <laurent@vivier.eu>2023-06-22 09:26:47 +0200
commit836126c77326d9a7b629063c9caa9deff3a26aed (patch)
tree734c7ccee7363693dfc95898b68ee4a0562f042a /hw/m68k
parent804ae67ee6fc3ff5a6c82edba7ed4cbdd33de091 (diff)
q800: move ESCC device to Q800MachineState
Also change the instantiation of the ESCC 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-17-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index 13806613fa..8bf94b2511 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -346,7 +346,9 @@ static void q800_machine_init(MachineState *machine)
/* SCC */
- dev = qdev_new(TYPE_ESCC);
+ object_initialize_child(OBJECT(machine), "escc", &m->escc,
+ TYPE_ESCC);
+ dev = DEVICE(&m->escc);
qdev_prop_set_uint32(dev, "disabled", 0);
qdev_prop_set_uint32(dev, "frequency", MAC_CLOCK);
qdev_prop_set_uint32(dev, "it_shift", 1);
@@ -356,7 +358,7 @@ static void q800_machine_init(MachineState *machine)
qdev_prop_set_uint32(dev, "chnBtype", 0);
qdev_prop_set_uint32(dev, "chnAtype", 0);
sysbus = SYS_BUS_DEVICE(dev);
- sysbus_realize_and_unref(sysbus, &error_fatal);
+ sysbus_realize(sysbus, &error_fatal);
/* Logically OR both its IRQs together */
escc_orgate = DEVICE(object_new(TYPE_OR_IRQ));