[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/35] next-cube: convert next-pc device to use Resettable interfa
From: |
Thomas Huth |
Subject: |
[PULL 19/35] next-cube: convert next-pc device to use Resettable interface |
Date: |
Sun, 29 Dec 2024 08:25:10 +0100 |
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241222130012.1013374-18-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
---
hw/m68k/next-cube.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 0cf4470ce8..091e05465e 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -1009,9 +1009,9 @@ static const MemoryRegionOps next_dummy_en_ops = {
.endianness = DEVICE_BIG_ENDIAN,
};
-static void next_pc_reset(DeviceState *dev)
+static void next_pc_reset_hold(Object *obj, ResetType type)
{
- NeXTPC *s = NEXT_PC(dev);
+ NeXTPC *s = NEXT_PC(obj);
/* Set internal registers to initial values */
/* 0x0000XX00 << vital bits */
@@ -1140,12 +1140,13 @@ static const VMStateDescription next_pc_vmstate = {
static void next_pc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
dc->desc = "NeXT Peripheral Controller";
dc->realize = next_pc_realize;
- device_class_set_legacy_reset(dc, next_pc_reset);
device_class_set_props(dc, next_pc_properties);
dc->vmsd = &next_pc_vmstate;
+ rc->phases.hold = next_pc_reset_hold;
}
static const TypeInfo next_pc_info = {
--
2.47.1
- [PULL 10/35] next-cube: move SCSI 4020/4021 logic from next-pc device to next-scsi device, (continued)
- [PULL 10/35] next-cube: move SCSI 4020/4021 logic from next-pc device to next-scsi device, Thomas Huth, 2024/12/29
- [PULL 11/35] next-cube: move floppy disk MMIO to separate memory region in next-pc, Thomas Huth, 2024/12/29
- [PULL 12/35] next-cube: map ESCC registers as a subregion of the next.scr memory region, Thomas Huth, 2024/12/29
- [PULL 13/35] next-cube: move ESCC to be QOM child of next-pc device, Thomas Huth, 2024/12/29
- [PULL 14/35] next-cube: move timer MMIO to separate memory region on next-pc device, Thomas Huth, 2024/12/29
- [PULL 15/35] next-cube: move en ethernet MMIO to separate memory region on next-pc device, Thomas Huth, 2024/12/29
- [PULL 16/35] next-cube: add empty slots for unknown accesses to next.scr memory region, Thomas Huth, 2024/12/29
- [PULL 17/35] next-cube: remove unused next.scr memory region, Thomas Huth, 2024/12/29
- [PULL 25/35] next-cube: use named gpio to read RTC data bit in scr2, Thomas Huth, 2024/12/29
- [PULL 18/35] next-cube: rearrange NeXTState declarations to improve readability, Thomas Huth, 2024/12/29
- [PULL 19/35] next-cube: convert next-pc device to use Resettable interface,
Thomas Huth <=
- [PULL 20/35] next-cube: rename typedef struct NextRtc to NeXTRTC, Thomas Huth, 2024/12/29
- [PULL 21/35] next-cube: use qemu_irq to drive int_status in next_scr2_rtc_update(), Thomas Huth, 2024/12/29
- [PULL 23/35] next-cube: always use retval to return rtc read values, Thomas Huth, 2024/12/29
- [PULL 24/35] next-cube: use named gpio to set RTC data bit in scr2, Thomas Huth, 2024/12/29
- [PULL 30/35] next-cube: use named gpio output for next-rtc data, Thomas Huth, 2024/12/29
- [PULL 26/35] next-cube: don't use rtc phase value of -1, Thomas Huth, 2024/12/29
- [PULL 27/35] next-cube: QOMify NeXTRTC, Thomas Huth, 2024/12/29
- [PULL 29/35] next-cube: move rtc-data-in gpio from next-pc to next-rtc device, Thomas Huth, 2024/12/29
- [PULL 31/35] next-cube: add rtc-cmd-reset named gpio to reset the rtc state machine, Thomas Huth, 2024/12/29
- [PULL 32/35] next-cube: add rtc-power-out named gpio to trigger the NEXT_PWR_I interrupt, Thomas Huth, 2024/12/29