On 14/12/24 07:10, Thomas Huth wrote:
Am Thu, 12 Dec 2024 11:45:57 +0000
schrieb Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk>:
Since the ESCC is part of the next-pc device, move the ESCC to be a QOM child
of the next-pc device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk>
---
hw/m68k/next-cube.c | 54 ++++++++++++++++++++++-----------------------
1 file changed, 26 insertions(+), 28 deletions(-)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index efbb11e74b..20a0b073e1 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -124,6 +124,8 @@ struct NeXTPC {
qemu_irq scsi_reset;
qemu_irq scsi_dma;
+ ESCCState escc;
+
NextRtc rtc;
};
static void next_pc_reset(DeviceState *dev)
{
NeXTPC *s = NEXT_PC(dev);
@@ -1043,6 +1020,28 @@ static void next_pc_realize(DeviceState *dev, Error
**errp)
/* Floppy */
memory_region_add_subregion(&s->scrmem, 0x14108,
&s->floppy_mem);
+
+ /* ESCC */
+ d = DEVICE(object_resolve_path_component(OBJECT(dev), "escc"));
Can't you use s->escc directly here instead of taking the detour via
object_resolve_path_component() ?
Indeed.
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>