From: "Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
qemu-ppc@nongnu.org,
"Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
Subject: [PATCH 2/4] hw/misc/macio/gpio: Convert to Resettable interface
Date: Wed, 02 Dec 2026 08:08:57 +0000 [thread overview]
Message-ID: <20261202-macio-resettable-v1-2-29edd4e17400@gmail.com> (raw)
In-Reply-To: <20261202-macio-resettable-v1-0-29edd4e17400@gmail.com>
Replace the deprecated device_class_set_legacy_reset() with the
Resettable interface by implementing the hold phase in
macio_gpio_reset_hold().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
hw/misc/macio/gpio.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/misc/macio/gpio.c b/hw/misc/macio/gpio.c
index ba001f7..1e21b4c 100644
--- a/hw/misc/macio/gpio.c
+++ b/hw/misc/macio/gpio.c
@@ -180,9 +180,9 @@ static const VMStateDescription vmstate_macio_gpio = {
}
};
-static void macio_gpio_reset(DeviceState *dev)
+static void macio_gpio_reset_hold(Object *obj, ResetType type)
{
- MacIOGPIOState *s = MACIO_GPIO(dev);
+ MacIOGPIOState *s = MACIO_GPIO(obj);
/* GPIO 1 is up by default */
macio_set_gpio(s, 1, true);
@@ -198,8 +198,9 @@ static void macio_gpio_class_init(ObjectClass *oc, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
NMIClass *nc = NMI_CLASS(oc);
+ ResettableClass *rc = RESETTABLE_CLASS(oc);
- device_class_set_legacy_reset(dc, macio_gpio_reset);
+ rc->phases.hold = macio_gpio_reset_hold;
dc->vmsd = &vmstate_macio_gpio;
nc->raise_nmi = macio_gpio_nmi;
}
--
2.53.0
next prev parent reply other threads:[~2026-12-02 8:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 8:08 [PATCH 0/4] hw/misc/macio: Convert PowerMac devices to Resettable interface Oscar Alejandro Sánchez Lucero
2026-12-02 8:08 ` [PATCH 1/4] hw/misc/macio/cuda: Convert " Oscar Alejandro Sánchez Lucero
2026-12-02 8:08 ` Oscar Alejandro Sánchez Lucero [this message]
2026-12-02 8:08 ` [PATCH 3/4] hw/misc/macio/mac_dbdma: " Oscar Alejandro Sánchez Lucero
2026-12-02 8:08 ` [PATCH 4/4] hw/misc/macio/pmu: " Oscar Alejandro Sánchez Lucero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202-macio-resettable-v1-2-29edd4e17400@gmail.com \
--to=aleszlucero@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.