aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/macio
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-03-05 15:09:51 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-03-09 09:28:28 +0000
commitc697fc80a8e7ee0594afbbf0758fcf889f47d31e (patch)
treeb10281877cb159727ce56379449df4acdf3d96fe /hw/misc/macio
parent9d9f4eac2c8fd7a623d7b91e21d08d34ce50315d (diff)
downloadqemu-c697fc80a8e7ee0594afbbf0758fcf889f47d31e.zip
qemu-c697fc80a8e7ee0594afbbf0758fcf889f47d31e.tar.gz
qemu-c697fc80a8e7ee0594afbbf0758fcf889f47d31e.tar.bz2
mos6522: use device_class_set_parent_reset() to propagate reset to parent
Switch from using a legacy approach to the more formal approach for propagating device reset to the parent. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20220305150957.5053-7-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/misc/macio')
-rw-r--r--hw/misc/macio/cuda.c3
-rw-r--r--hw/misc/macio/pmu.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c
index 693fc82..1498113 100644
--- a/hw/misc/macio/cuda.c
+++ b/hw/misc/macio/cuda.c
@@ -606,7 +606,8 @@ static void mos6522_cuda_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
MOS6522DeviceClass *mdc = MOS6522_CLASS(oc);
- dc->reset = mos6522_cuda_reset;
+ device_class_set_parent_reset(dc, mos6522_cuda_reset,
+ &mdc->parent_reset);
mdc->portB_write = mos6522_cuda_portB_write;
mdc->get_timer1_counter_value = cuda_get_counter_value;
mdc->get_timer2_counter_value = cuda_get_counter_value;
diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c
index b210068..5b1ec10 100644
--- a/hw/misc/macio/pmu.c
+++ b/hw/misc/macio/pmu.c
@@ -850,7 +850,8 @@ static void mos6522_pmu_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
MOS6522DeviceClass *mdc = MOS6522_CLASS(oc);
- dc->reset = mos6522_pmu_reset;
+ device_class_set_parent_reset(dc, mos6522_pmu_reset,
+ &mdc->parent_reset);
mdc->portB_write = mos6522_pmu_portB_write;
mdc->portA_write = mos6522_pmu_portA_write;
}