[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/20] q800-glue.c: convert to Resettable interface
From: |
Laurent Vivier |
Subject: |
[PULL 01/20] q800-glue.c: convert to Resettable interface |
Date: |
Sun, 8 Oct 2023 08:23:30 +0200 |
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
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>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20231004083806.757242-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
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 34c4f0e9876d..710a5c331ec9 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.41.0
- [PULL 00/20] Q800 for 8.2 patches, Laurent Vivier, 2023/10/08
- [PULL 04/20] q800: implement additional machine id bits on VIA1 port A, Laurent Vivier, 2023/10/08
- [PULL 02/20] q800: add djMEMC memory controller, Laurent Vivier, 2023/10/08
- [PULL 01/20] q800-glue.c: convert to Resettable interface,
Laurent Vivier <=
- [PULL 05/20] q800: add IOSB subsystem, Laurent Vivier, 2023/10/08
- [PULL 06/20] q800: allow accesses to RAM area even if less memory is available, Laurent Vivier, 2023/10/08
- [PULL 08/20] asc: generate silence if FIFO empty but engine still running, Laurent Vivier, 2023/10/08
- [PULL 03/20] q800: add machine id register, Laurent Vivier, 2023/10/08
- [PULL 07/20] audio: add Apple Sound Chip (ASC) emulation, Laurent Vivier, 2023/10/08
- [PULL 09/20] q800: add Apple Sound Chip (ASC) audio to machine, Laurent Vivier, 2023/10/08
- [PULL 10/20] q800: add easc bool machine class property to switch between ASC and EASC, Laurent Vivier, 2023/10/08
- [PULL 11/20] swim: add trace events for IWM and ISM registers, Laurent Vivier, 2023/10/08
- [PULL 12/20] swim: split into separate IWM and ISM register blocks, Laurent Vivier, 2023/10/08
- [PULL 13/20] swim: update IWM/ISM register block decoding, Laurent Vivier, 2023/10/08