aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-10-10 22:37:06 +0200
committerPeter Maydell <peter.maydell@linaro.org>2020-10-20 16:12:00 +0100
commitf3f69362fdd957dbdc6b5bd1120347560752e4b2 (patch)
tree3965aa7adb4e77b08c1db37b9f58e069e829cf19 /hw
parentb77a52a0c14163e4d8602c94b64bae9cf3524ee1 (diff)
downloadqemu-f3f69362fdd957dbdc6b5bd1120347560752e4b2.zip
qemu-f3f69362fdd957dbdc6b5bd1120347560752e4b2.tar.gz
qemu-f3f69362fdd957dbdc6b5bd1120347560752e4b2.tar.bz2
hw/timer/bcm2835: Introduce BCM2835_SYSTIMER_COUNT definition
Use the BCM2835_SYSTIMER_COUNT definition instead of the magic '4' value. Reviewed-by: Luc Michel <luc.michel@greensocs.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20201010203709.3116542-2-f4bug@amsat.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/timer/bcm2835_systmr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/timer/bcm2835_systmr.c b/hw/timer/bcm2835_systmr.c
index 3387a62..ff8c553 100644
--- a/hw/timer/bcm2835_systmr.c
+++ b/hw/timer/bcm2835_systmr.c
@@ -134,7 +134,8 @@ static const VMStateDescription bcm2835_systmr_vmstate = {
.minimum_version_id = 1,
.fields = (VMStateField[]) {
VMSTATE_UINT32(reg.status, BCM2835SystemTimerState),
- VMSTATE_UINT32_ARRAY(reg.compare, BCM2835SystemTimerState, 4),
+ VMSTATE_UINT32_ARRAY(reg.compare, BCM2835SystemTimerState,
+ BCM2835_SYSTIMER_COUNT),
VMSTATE_END_OF_LIST()
}
};