[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/19] hw/timer/arm_timer: Move SP804 code around
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 03/19] hw/timer/arm_timer: Move SP804 code around |
Date: |
Tue, 4 Jul 2023 16:49:56 +0200 |
Move sp804_properties[] and sp804_class_init() around
with the rest of SP804 code code. What follows the
"Integrator/CP timer module." is strictly ICP related.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/timer/arm_timer.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c
index 30a34a9a92..0e5d5d0f6d 100644
--- a/hw/timer/arm_timer.c
+++ b/hw/timer/arm_timer.c
@@ -309,6 +309,21 @@ static void sp804_realize(DeviceState *dev, Error **errp)
s->timer[1]->irq = qemu_allocate_irq(sp804_set_irq, s, 1);
}
+static Property sp804_properties[] = {
+ DEFINE_PROP_UINT32("freq0", SP804State, freq0, 1000000),
+ DEFINE_PROP_UINT32("freq1", SP804State, freq1, 1000000),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
+static void sp804_class_init(ObjectClass *klass, void *data)
+{
+ DeviceClass *k = DEVICE_CLASS(klass);
+
+ k->realize = sp804_realize;
+ device_class_set_props(k, sp804_properties);
+ k->vmsd = &vmstate_sp804;
+}
+
/* Integrator/CP timer module. */
#define TYPE_INTEGRATOR_PIT "integrator_pit"
@@ -380,21 +395,6 @@ static void icp_pit_init(Object *obj)
save themselves. */
}
-static Property sp804_properties[] = {
- DEFINE_PROP_UINT32("freq0", SP804State, freq0, 1000000),
- DEFINE_PROP_UINT32("freq1", SP804State, freq1, 1000000),
- DEFINE_PROP_END_OF_LIST(),
-};
-
-static void sp804_class_init(ObjectClass *klass, void *data)
-{
- DeviceClass *k = DEVICE_CLASS(klass);
-
- k->realize = sp804_realize;
- device_class_set_props(k, sp804_properties);
- k->vmsd = &vmstate_sp804;
-}
-
static const TypeInfo arm_timer_types[] = {
{
.name = TYPE_INTEGRATOR_PIT,
--
2.38.1
- [PATCH v2 00/19] hw/timer/arm_timer: QOM'ify ARM_TIMER and correct sysbus/irq in ICP_PIT, Philippe Mathieu-Daudé, 2023/07/04
- [PATCH v2 01/19] hw/timer/arm_timer: Declare QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2023/07/04
- [PATCH v2 02/19] hw/timer/arm_timer: Remove pointless cast from void *, Philippe Mathieu-Daudé, 2023/07/04
- [PATCH v2 03/19] hw/timer/arm_timer: Move SP804 code around,
Philippe Mathieu-Daudé <=
- [PATCH v2 06/19] hw/timer/arm_timer: Rename SP804State -> SP804Timer, Philippe Mathieu-Daudé, 2023/07/04
- [PATCH v2 04/19] hw/timer/arm_timer: CamelCase rename icp_pit_state -> IntegratorPIT, Philippe Mathieu-Daudé, 2023/07/04
- [PATCH v2 05/19] hw/timer/arm_timer: CamelCase rename arm_timer_state -> ArmTimer, Philippe Mathieu-Daudé, 2023/07/04
- [PATCH v2 07/19] hw/timer/arm_timer: Rename TYPE_SP804 -> TYPE_SP804_TIMER, Philippe Mathieu-Daudé, 2023/07/04
- [PATCH v2 09/19] hw/timer/arm_timer: Convert read/write handlers to MemoryRegionOps ones, Philippe Mathieu-Daudé, 2023/07/04