summary refs log tree commit diff stats
path: root/hw/m68k/next-cube.c
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-12-22 12:59:58 +0000
committerThomas Huth <huth@tuxfamily.org>2024-12-29 07:13:47 +0100
commit825ac1256426b196daac626f96054a152bb5f887 (patch)
treeb853bb80c6601844f3a535c64359af9daae1b98e /hw/m68k/next-cube.c
parent214de32ea832f896afd5c66eb408979e6f99bea0 (diff)
downloadfocaccia-qemu-825ac1256426b196daac626f96054a152bb5f887.tar.gz
focaccia-qemu-825ac1256426b196daac626f96054a152bb5f887.zip
next-cube: use qemu_irq to drive int_status in next_scr2_rtc_update()
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>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
Message-ID: <20241222130012.1013374-20-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Diffstat (limited to 'hw/m68k/next-cube.c')
-rw-r--r--hw/m68k/next-cube.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 19b9100094..12f8ecd2d4 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);
 }
 
 /*