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>
This commit is contained in:
parent
804ae67ee6
commit
836126c773
|
@ -346,7 +346,9 @@ static void q800_machine_init(MachineState *machine)
|
||||||
|
|
||||||
/* SCC */
|
/* 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, "disabled", 0);
|
||||||
qdev_prop_set_uint32(dev, "frequency", MAC_CLOCK);
|
qdev_prop_set_uint32(dev, "frequency", MAC_CLOCK);
|
||||||
qdev_prop_set_uint32(dev, "it_shift", 1);
|
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, "chnBtype", 0);
|
||||||
qdev_prop_set_uint32(dev, "chnAtype", 0);
|
qdev_prop_set_uint32(dev, "chnAtype", 0);
|
||||||
sysbus = SYS_BUS_DEVICE(dev);
|
sysbus = SYS_BUS_DEVICE(dev);
|
||||||
sysbus_realize_and_unref(sysbus, &error_fatal);
|
sysbus_realize(sysbus, &error_fatal);
|
||||||
|
|
||||||
/* Logically OR both its IRQs together */
|
/* Logically OR both its IRQs together */
|
||||||
escc_orgate = DEVICE(object_new(TYPE_OR_IRQ));
|
escc_orgate = DEVICE(object_new(TYPE_OR_IRQ));
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "hw/m68k/q800-glue.h"
|
#include "hw/m68k/q800-glue.h"
|
||||||
#include "hw/misc/mac_via.h"
|
#include "hw/misc/mac_via.h"
|
||||||
#include "hw/net/dp8393x.h"
|
#include "hw/net/dp8393x.h"
|
||||||
|
#include "hw/char/escc.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The main Q800 machine
|
* The main Q800 machine
|
||||||
|
@ -44,6 +45,7 @@ struct Q800MachineState {
|
||||||
MOS6522Q800VIA1State via1;
|
MOS6522Q800VIA1State via1;
|
||||||
MOS6522Q800VIA2State via2;
|
MOS6522Q800VIA2State via2;
|
||||||
dp8393xState dp8393x;
|
dp8393xState dp8393x;
|
||||||
|
ESCCState escc;
|
||||||
MemoryRegion macio;
|
MemoryRegion macio;
|
||||||
MemoryRegion macio_alias;
|
MemoryRegion macio_alias;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue