From f3f69362fdd957dbdc6b5bd1120347560752e4b2 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Sat, 10 Oct 2020 22:37:06 +0200 Subject: hw/timer/bcm2835: Introduce BCM2835_SYSTIMER_COUNT definition Use the BCM2835_SYSTIMER_COUNT definition instead of the magic '4' value. Reviewed-by: Luc Michel Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-id: 20201010203709.3116542-2-f4bug@amsat.org Signed-off-by: Peter Maydell --- include/hw/timer/bcm2835_systmr.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/hw/timer') 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; }; -- cgit v1.2.3-55-g7522