Skip to content

Commit

Permalink
q800-glue.c: convert to Resettable interface
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mcayland authored and vivier committed Oct 6, 2023
1 parent 2f3913f commit d43e967
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hw/m68k/q800-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit d43e967

Please sign in to comment.