[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 17/34] next-cube: convert next-pc device to use Resettable int
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v2 17/34] next-cube: convert next-pc device to use Resettable interface |
Date: |
Thu, 12 Dec 2024 11:46:03 +0000 |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-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 5333fc7bef..4a11fe6b39 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 */
@@ -1141,12 +1141,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.39.5
- Re: [PATCH v2 11/34] next-cube: move ESCC to be QOM child of 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 <=
- [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, 2024/12/12
- [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