hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off
[qemu/ar7.git] / include / hw / timer / bcm2835_systmr.h
blobbd3097d746b2d54f94ea7e792ec38d59eb80e0e1
1 /*
2 * BCM2835 SYS timer emulation
4 * Copyright (c) 2019 Philippe Mathieu-Daudé <f4bug@amsat.org>
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
9 #ifndef BCM2835_SYSTIMER_H
10 #define BCM2835_SYSTIMER_H
12 #include "hw/sysbus.h"
13 #include "hw/irq.h"
14 #include "qemu/timer.h"
15 #include "qom/object.h"
17 #define TYPE_BCM2835_SYSTIMER "bcm2835-sys-timer"
18 OBJECT_DECLARE_SIMPLE_TYPE(BCM2835SystemTimerState, BCM2835_SYSTIMER)
20 #define BCM2835_SYSTIMER_COUNT 4
22 typedef struct {
23 unsigned id;
24 QEMUTimer timer;
25 qemu_irq irq;
26 BCM2835SystemTimerState *state;
27 } BCM2835SystemTimerCompare;
29 struct BCM2835SystemTimerState {
30 /*< private >*/
31 SysBusDevice parent_obj;
33 /*< public >*/
34 MemoryRegion iomem;
35 struct {
36 uint32_t ctrl_status;
37 uint32_t compare[BCM2835_SYSTIMER_COUNT];
38 } reg;
39 BCM2835SystemTimerCompare tmr[BCM2835_SYSTIMER_COUNT];
42 #endif