[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 19/34] next-cube: use qemu_irq to drive int_status in next_scr
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v2 19/34] next-cube: use qemu_irq to drive int_status in next_scr2_rtc_update() |
Date: |
Thu, 12 Dec 2024 11:46:05 +0000 |
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>
---
hw/m68k/next-cube.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 0b07cd1a75..7c6dc132fe 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);
}
/*
--
2.39.5
- [PATCH v2 13/34] next-cube: move en ethernet MMIO to separate memory region on next-pc device, (continued)
- [PATCH v2 13/34] next-cube: move en ethernet MMIO to separate memory region on next-pc device, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 15/34] next-cube: remove unused next.scr memory region, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 14/34] next-cube: add empty slots for unknown accesses to next.scr memory region, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 16/34] next-cube: rearrange NeXTState declarations to improve readability, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 17/34] next-cube: convert next-pc device to use Resettable interface, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 18/34] next-cube: rename typedef struct NextRtc to NeXTRTC, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 19/34] next-cube: use qemu_irq to drive int_status in next_scr2_rtc_update(),
Mark Cave-Ayland <=
- [PATCH v2 20/34] next-cube: separate rtc read and write shift logic, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 21/34] next-cube: always use retval to return rtc read values, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 22/34] next-cube: use named gpio to set RTC data bit in scr2, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 23/34] next-cube: use named gpio to read RTC data bit in scr2, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 24/34] next-cube: don't use rtc phase value of -1, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 25/34] next-cube: QOMify NeXTRTC, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 26/34] next-cube: move reset of next-rtc fields from next-pc to next-rtc, Mark Cave-Ayland, 2024/12/12