Message ID | 20241023085852.1061031-22-mark.cave-ayland@ilande.co.uk |
---|---|
State | New |
Headers | show |
Series | next-cube: more tidy-ups and improvements | expand |
Am Wed, 23 Oct 2024 09:58:37 +0100 schrieb Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>: > Rather than directly clear bit 3 in int_status in next_scr2_rtc_update(), use > a qemu_irq to drive the equivalent NEXT_PWR_I signal. > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> > --- > hw/m68k/next-cube.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Thomas Huth <huth@tuxfamily.org>
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index 33297f01b8..bb375b63ca 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -98,6 +98,7 @@ struct NeXTPC { ESCCState escc; NeXTRTC rtc; + qemu_irq rtc_power_irq; }; typedef struct next_dma { @@ -267,7 +268,7 @@ static void next_scr2_rtc_update(NeXTPC *s) /* clear FTU */ if (rtc->value & 0x04) { rtc->status = rtc->status & (~0x18); - s->int_status = s->int_status & (~0x04); + qemu_irq_lower(s->rtc_power_irq); } } } @@ -1093,6 +1094,8 @@ static void next_pc_init(Object *obj) memory_region_init_io(&s->timer_mem, OBJECT(s), &next_timer_ops, s, "next.timer", 4); sysbus_init_mmio(sbd, &s->timer_mem); + + s->rtc_power_irq = qdev_get_gpio_in(DEVICE(obj), NEXT_PWR_I); } /*
Rather than directly clear bit 3 in int_status in next_scr2_rtc_update(), use a qemu_irq to drive the equivalent NEXT_PWR_I signal. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> --- hw/m68k/next-cube.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)