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:56 +0000
committerThomas Huth <huth@tuxfamily.org>2024-12-29 07:13:47 +0100
commitce788d3740f7510be7a40dea5e0856d0986f350a (patch)
treee19c45508449d4f3eb055d26659c52fb390117a5 /hw/m68k/next-cube.c
parent9f15303ce29fdd422e5b571b78979abd97005267 (diff)
downloadfocaccia-qemu-ce788d3740f7510be7a40dea5e0856d0986f350a.tar.gz
focaccia-qemu-ce788d3740f7510be7a40dea5e0856d0986f350a.zip
next-cube: convert next-pc device to use Resettable interface
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>
Diffstat (limited to 'hw/m68k/next-cube.c')
-rw-r--r--hw/m68k/next-cube.c7
1 files 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 = {