clocksource/drivers/arm_arch_timer: Work around broken CVAL implementations
authorMarc Zyngier <maz@kernel.org>
Sun, 17 Oct 2021 12:42:17 +0000 (13:42 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sun, 17 Oct 2021 19:47:31 +0000 (21:47 +0200)
commit012f188504528b8cb32f441ac3bd9ea2eba39c9e
tree9e0ae47a3a10cc2af6f5c666965d8f4019565ebb
parent30aa08da35e07a51a81d489517a3f6fb5164b09c
clocksource/drivers/arm_arch_timer: Work around broken CVAL implementations

The Applied Micro XGene-1 SoC has a busted implementation of the
CVAL register: it looks like it is based on TVAL instead of the
other way around. The net effect of this implementation blunder
is that the maximum deadline you can program in the timer is
32bit wide.

Use a MIDR check to notice the broken CPU, and reduce the width
of the timer to 32bit.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-10-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/arm_arch_timer.c