* [PATCH 0/4] hw/misc/macio: Convert PowerMac devices to Resettable interface
@ 2026-12-02 8:08 Oscar Alejandro Sánchez Lucero
2026-12-02 8:08 ` [PATCH 1/4] hw/misc/macio/cuda: Convert " Oscar Alejandro Sánchez Lucero
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-12-02 8:08 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, qemu-ppc, Oscar Alejandro Sánchez Lucero
Convert all remaining devices in hw/misc/macio away from the deprecated
device_class_set_legacy_reset() wrapper to the ResettableClass interface
(hold phase), moving towards removing the legacy_reset callback from
DeviceClass once all callers are migrated (as noted in
include/hw/core/qdev.h).
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
Oscar Alejandro Sánchez Lucero (4):
hw/misc/macio/cuda: Convert to Resettable interface
hw/misc/macio/gpio: Convert to Resettable interface
hw/misc/macio/mac_dbdma: Convert to Resettable interface
hw/misc/macio/pmu: Convert to Resettable interface
hw/misc/macio/cuda.c | 7 ++++---
hw/misc/macio/gpio.c | 7 ++++---
hw/misc/macio/mac_dbdma.c | 7 ++++---
hw/misc/macio/pmu.c | 7 ++++---
4 files changed, 16 insertions(+), 12 deletions(-)
---
base-commit: bbece0805c03c25f51a8cd89c39142f4f76a6567
change-id: 20261202-macio-resettable-87fa7f99f480
Best regards,
--
Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] hw/misc/macio/cuda: Convert to Resettable interface
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
2026-12-02 8:08 ` [PATCH 2/4] hw/misc/macio/gpio: " Oscar Alejandro Sánchez Lucero
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-12-02 8:08 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, qemu-ppc, Oscar Alejandro Sánchez Lucero
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] hw/misc/macio/gpio: Convert to Resettable interface
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
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
3 siblings, 0 replies; 5+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-12-02 8:08 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, qemu-ppc, Oscar Alejandro Sánchez Lucero
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] hw/misc/macio/mac_dbdma: Convert to Resettable interface
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 ` [PATCH 2/4] hw/misc/macio/gpio: " Oscar Alejandro Sánchez Lucero
@ 2026-12-02 8:08 ` Oscar Alejandro Sánchez Lucero
2026-12-02 8:08 ` [PATCH 4/4] hw/misc/macio/pmu: " Oscar Alejandro Sánchez Lucero
3 siblings, 0 replies; 5+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-12-02 8:08 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, qemu-ppc, Oscar Alejandro Sánchez Lucero
Replace the deprecated device_class_set_legacy_reset() with the
Resettable interface by implementing the hold phase in
mac_dbdma_reset_hold().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
hw/misc/macio/mac_dbdma.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c
index d00181b..6fb25da 100644
--- a/hw/misc/macio/mac_dbdma.c
+++ b/hw/misc/macio/mac_dbdma.c
@@ -858,9 +858,9 @@ static const VMStateDescription vmstate_dbdma = {
}
};
-static void mac_dbdma_reset(DeviceState *d)
+static void mac_dbdma_reset_hold(Object *obj, ResetType type)
{
- DBDMAState *s = MAC_DBDMA(d);
+ DBDMAState *s = MAC_DBDMA(obj);
int i;
for (i = 0; i < DBDMA_CHANNELS; i++) {
@@ -922,9 +922,10 @@ static void mac_dbdma_realize(DeviceState *dev, Error **errp)
static void mac_dbdma_class_init(ObjectClass *oc, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
+ ResettableClass *rc = RESETTABLE_CLASS(oc);
dc->realize = mac_dbdma_realize;
- device_class_set_legacy_reset(dc, mac_dbdma_reset);
+ rc->phases.hold = mac_dbdma_reset_hold;
dc->vmsd = &vmstate_dbdma;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] hw/misc/macio/pmu: Convert to Resettable interface
2026-12-02 8:08 [PATCH 0/4] hw/misc/macio: Convert PowerMac devices to Resettable interface Oscar Alejandro Sánchez Lucero
` (2 preceding siblings ...)
2026-12-02 8:08 ` [PATCH 3/4] hw/misc/macio/mac_dbdma: " Oscar Alejandro Sánchez Lucero
@ 2026-12-02 8:08 ` Oscar Alejandro Sánchez Lucero
3 siblings, 0 replies; 5+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-12-02 8:08 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, qemu-ppc, Oscar Alejandro Sánchez Lucero
Replace the deprecated device_class_set_legacy_reset() with the
Resettable interface by implementing the hold phase in
pmu_reset_hold().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
hw/misc/macio/pmu.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c
index 04640c2..bbb0c18 100644
--- a/hw/misc/macio/pmu.c
+++ b/hw/misc/macio/pmu.c
@@ -704,9 +704,9 @@ static const VMStateDescription vmstate_pmu = {
}
};
-static void pmu_reset(DeviceState *dev)
+static void pmu_reset_hold(Object *obj, ResetType type)
{
- PMUState *s = VIA_PMU(dev);
+ PMUState *s = VIA_PMU(obj);
/* OpenBIOS needs to do this? MacOS 9 needs it */
s->intmask = PMU_INT_ADB | PMU_INT_TICK;
@@ -767,9 +767,10 @@ static const Property pmu_properties[] = {
static void pmu_class_init(ObjectClass *oc, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
+ ResettableClass *rc = RESETTABLE_CLASS(oc);
dc->realize = pmu_realize;
- device_class_set_legacy_reset(dc, pmu_reset);
+ rc->phases.hold = pmu_reset_hold;
dc->vmsd = &vmstate_pmu;
device_class_set_props(dc, pmu_properties);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-12-02 8:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/4] hw/misc/macio/gpio: " 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
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.