diff options
author | Philippe Mathieu-Daudé | 2020-10-10 22:37:06 +0200 |
---|---|---|
committer | Peter Maydell | 2020-10-20 17:12:00 +0200 |
commit | f3f69362fdd957dbdc6b5bd1120347560752e4b2 (patch) | |
tree | 3965aa7adb4e77b08c1db37b9f58e069e829cf19 /include/hw/timer | |
parent | hw/arm: Restrict APEI tables generation to the 'virt' machine (diff) | |
download | qemu-f3f69362fdd957dbdc6b5bd1120347560752e4b2.tar.gz qemu-f3f69362fdd957dbdc6b5bd1120347560752e4b2.tar.xz qemu-f3f69362fdd957dbdc6b5bd1120347560752e4b2.zip |
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 'include/hw/timer')
-rw-r--r-- | include/hw/timer/bcm2835_systmr.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/timer/bcm2835_systmr.h b/include/hw/timer/bcm2835_systmr.h index 7ce8f6ef4d..43df7ee488 100644 --- a/include/hw/timer/bcm2835_systmr.h +++ b/include/hw/timer/bcm2835_systmr.h @@ -16,6 +16,8 @@ #define TYPE_BCM2835_SYSTIMER "bcm2835-sys-timer" OBJECT_DECLARE_SIMPLE_TYPE(BCM2835SystemTimerState, BCM2835_SYSTIMER) +#define BCM2835_SYSTIMER_COUNT 4 + struct BCM2835SystemTimerState { /*< private >*/ SysBusDevice parent_obj; @@ -26,7 +28,7 @@ struct BCM2835SystemTimerState { struct { uint32_t status; - uint32_t compare[4]; + uint32_t compare[BCM2835_SYSTIMER_COUNT]; } reg; }; |