[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/35] hw/arm/stellaris: Convert ADC controller to Resettable inte
From: |
Peter Maydell |
Subject: |
[PULL 19/35] hw/arm/stellaris: Convert ADC controller to Resettable interface |
Date: |
Thu, 15 Feb 2024 17:35:22 +0000 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20240213155214.13619-2-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/stellaris.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index 34c5a86ac2e..4fa857970b4 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -773,8 +773,9 @@ static void stellaris_adc_trigger(void *opaque, int irq,
int level)
}
}
-static void stellaris_adc_reset(StellarisADCState *s)
+static void stellaris_adc_reset_hold(Object *obj)
{
+ StellarisADCState *s = STELLARIS_ADC(obj);
int n;
for (n = 0; n < 4; n++) {
@@ -946,7 +947,6 @@ static void stellaris_adc_init(Object *obj)
memory_region_init_io(&s->iomem, obj, &stellaris_adc_ops, s,
"adc", 0x1000);
sysbus_init_mmio(sbd, &s->iomem);
- stellaris_adc_reset(s);
qdev_init_gpio_in(dev, stellaris_adc_trigger, 1);
}
@@ -1411,7 +1411,9 @@ static const TypeInfo stellaris_i2c_info = {
static void stellaris_adc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
+ rc->phases.hold = stellaris_adc_reset_hold;
dc->vmsd = &vmstate_stellaris_adc;
}
--
2.34.1
- [PULL 14/35] hw/arm/npcm7xx: Call qemu_configure_nic_device() for GMAC modules, (continued)
- [PULL 14/35] hw/arm/npcm7xx: Call qemu_configure_nic_device() for GMAC modules, Peter Maydell, 2024/02/15
- [PULL 16/35] target/arm: Don't get MDCR_EL2 in pmu_counter_enabled() before checking ARM_FEATURE_PMU, Peter Maydell, 2024/02/15
- [PULL 11/35] tests/qtest/bios-tables-test: Allow changes to virt GTDT, Peter Maydell, 2024/02/15
- [PULL 22/35] hw/arm/stellaris: Add missing QOM 'SoC' parent, Peter Maydell, 2024/02/15
- [PULL 05/35] target/arm: Split out make_svemte_desc, Peter Maydell, 2024/02/15
- [PULL 18/35] hw/arm/smmuv3: add support for stage 1 access fault, Peter Maydell, 2024/02/15
- [PULL 09/35] hw/block/tc58128: Don't emit deprecation warning under qtest, Peter Maydell, 2024/02/15
- [PULL 17/35] tests/qtest: Fix GMAC test to run on a machine in upstream QEMU, Peter Maydell, 2024/02/15
- [PULL 12/35] hw/arm/virt: Wire up non-secure EL2 virtual timer IRQ, Peter Maydell, 2024/02/15
- [PULL 15/35] tests/qtest/npcm7xx_emc-test: Connect all NICs to a backend, Peter Maydell, 2024/02/15
- [PULL 19/35] hw/arm/stellaris: Convert ADC controller to Resettable interface,
Peter Maydell <=
- [PULL 21/35] hw/arm/stellaris: Add missing QOM 'machine' parent, Peter Maydell, 2024/02/15
- [PULL 23/35] target/arm: Use new CBAR encoding for all v8 CPUs, not all aarch64 CPUs, Peter Maydell, 2024/02/15
- [PULL 29/35] hw/misc/mps2-scc: Make changes needed for AN536 FPGA image, Peter Maydell, 2024/02/15
- [PULL 07/35] target/arm: Fix SVE/SME gross MTE suppression checks, Peter Maydell, 2024/02/15
- [PULL 26/35] target/arm: Allow access to SPSR_hyp from hyp mode, Peter Maydell, 2024/02/15
- [PULL 28/35] hw/misc/mps2-scc: Factor out which-board conditionals, Peter Maydell, 2024/02/15
- [PULL 25/35] target/arm: Add Cortex-R52 IMPDEF sysregs, Peter Maydell, 2024/02/15
- [PULL 34/35] hw/arm/mps3r: Add remaining devices, Peter Maydell, 2024/02/15
- [PULL 30/35] hw/arm/mps3r: Initial skeleton for mps3-an536 board, Peter Maydell, 2024/02/15
- [PULL 03/35] target/arm: Fix nregs computation in do_{ld,st}_zpa, Peter Maydell, 2024/02/15