[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/20] q800-glue.c: convert to Resettable interface
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v2 01/20] q800-glue.c: convert to Resettable interface |
Date: |
Sat, 9 Sep 2023 10:48:08 +0100 |
Convert the GLUE device to 3-phase reset. The legacy method
doesn't do anything that's invalid in the hold phase, so the
conversion is simple and not a behaviour change.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/m68k/q800-glue.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/m68k/q800-glue.c b/hw/m68k/q800-glue.c
index 34c4f0e987..710a5c331e 100644
--- a/hw/m68k/q800-glue.c
+++ b/hw/m68k/q800-glue.c
@@ -166,9 +166,9 @@ static void glue_nmi_release(void *opaque)
GLUE_set_irq(s, GLUE_IRQ_IN_NMI, 0);
}
-static void glue_reset(DeviceState *dev)
+static void glue_reset_hold(Object *obj)
{
- GLUEState *s = GLUE(dev);
+ GLUEState *s = GLUE(obj);
s->ipr = 0;
s->auxmode = 0;
@@ -223,11 +223,12 @@ static void glue_init(Object *obj)
static void glue_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
NMIClass *nc = NMI_CLASS(klass);
dc->vmsd = &vmstate_glue;
- dc->reset = glue_reset;
device_class_set_props(dc, glue_properties);
+ rc->phases.hold = glue_reset_hold;
nc->nmi_monitor_handler = glue_nmi;
}
--
2.39.2
- [PATCH v2 00/20] q800: add support for booting MacOS Classic - part 2, Mark Cave-Ayland, 2023/09/09
- [PATCH v2 01/20] q800-glue.c: convert to Resettable interface,
Mark Cave-Ayland <=
- [PATCH v2 02/20] q800: add djMEMC memory controller, Mark Cave-Ayland, 2023/09/09
- [PATCH v2 03/20] q800: add machine id register, Mark Cave-Ayland, 2023/09/09
- [PATCH v2 04/20] q800: implement additional machine id bits on VIA1 port A, Mark Cave-Ayland, 2023/09/09
- [PATCH v2 05/20] q800: add IOSB subsystem, Mark Cave-Ayland, 2023/09/09
- [PATCH v2 06/20] q800: allow accesses to RAM area even if less memory is available, Mark Cave-Ayland, 2023/09/09
- [PATCH v2 07/20] audio: add Apple Sound Chip (ASC) emulation, Mark Cave-Ayland, 2023/09/09