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 1/4] hw/misc/macio/cuda: Convert to Resettable interface
Date: Wed, 02 Dec 2026 08:08:56 +0000 [thread overview]
Message-ID: <20261202-macio-resettable-v1-1-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
cuda_reset_hold().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
hw/misc/macio/cuda.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c
index f065833..db9f7f7 100644
--- a/hw/misc/macio/cuda.c
+++ b/hw/misc/macio/cuda.c
@@ -504,9 +504,9 @@ static const VMStateDescription vmstate_cuda = {
}
};
-static void cuda_reset(DeviceState *dev)
+static void cuda_reset_hold(Object *obj, ResetType type)
{
- CUDAState *s = CUDA(dev);
+ CUDAState *s = CUDA(obj);
ADBBusState *adb_bus = &s->adb_bus;
s->data_in_size = 0;
@@ -563,9 +563,10 @@ static const Property cuda_properties[] = {
static void cuda_class_init(ObjectClass *oc, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
+ ResettableClass *rc = RESETTABLE_CLASS(oc);
dc->realize = cuda_realize;
- device_class_set_legacy_reset(dc, cuda_reset);
+ rc->phases.hold = cuda_reset_hold;
dc->vmsd = &vmstate_cuda;
device_class_set_props(dc, cuda_properties);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
--
2.53.0
next prev parent reply other threads:[~2026-12-02 8:09 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 ` Oscar Alejandro Sánchez Lucero [this message]
2026-12-02 8:08 ` [PATCH 2/4] hw/misc/macio/gpio: Convert " Oscar Alejandro Sánchez Lucero
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-1-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.