diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2024-02-18 18:41:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-03 15:28:50 +0200 |
commit | df13f43686f3d75f0c8273f70467ed33bdfe27a8 (patch) | |
tree | 0c9594e8aa7c32231a7210218b4d654fecd06173 | |
parent | 0982fd6bf0b822876f2e93ec782c4c28a3f85535 (diff) | |
download | linux-stable-df13f43686f3d75f0c8273f70467ed33bdfe27a8.tar.gz linux-stable-df13f43686f3d75f0c8273f70467ed33bdfe27a8.tar.bz2 linux-stable-df13f43686f3d75f0c8273f70467ed33bdfe27a8.zip |
clocksource/drivers/arm_global_timer: Fix maximum prescaler value
[ Upstream commit b34b9547cee41575a4fddf390f615570759dc999 ]
The prescaler in the "Global Timer Control Register bit assignments" is
documented to use bits [15:8], which means that the maximum prescaler
register value is 0xff.
Fixes: 171b45a4a70e ("clocksource/drivers/arm_global_timer: Implement rate compensation whenever source clock changes")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240218174138.1942418-2-martin.blumenstingl@googlemail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/clocksource/arm_global_timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c index 44a61dc6f932..e1c773bb5535 100644 --- a/drivers/clocksource/arm_global_timer.c +++ b/drivers/clocksource/arm_global_timer.c @@ -32,7 +32,7 @@ #define GT_CONTROL_IRQ_ENABLE BIT(2) /* banked */ #define GT_CONTROL_AUTO_INC BIT(3) /* banked */ #define GT_CONTROL_PRESCALER_SHIFT 8 -#define GT_CONTROL_PRESCALER_MAX 0xF +#define GT_CONTROL_PRESCALER_MAX 0xFF #define GT_CONTROL_PRESCALER_MASK (GT_CONTROL_PRESCALER_MAX << \ GT_CONTROL_PRESCALER_SHIFT) |