clocksource/drivers/arm_arch_timer: Introduce generic errata handling infrastructure
authorDing Tianhong <dingtianhong@huawei.com>
Mon, 6 Feb 2017 16:47:41 +0000 (16:47 +0000)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 7 Feb 2017 23:14:03 +0000 (00:14 +0100)
commit16d10ef29f25aba923779234bb93a451b14d20e6
tree3bec3cde9fcf0bd8e0d9a8940ef29ee9b49aeb18
parent5444ea6a7f46276876e94ecf8d44615af1ef22f7
clocksource/drivers/arm_arch_timer: Introduce generic errata handling infrastructure

Currently we have code inline in the arch timer probe path to cater for
Freescale erratum A-008585, complete with ifdeffery. This is a little
ugly, and will get worse as we try to add more errata handling.

This patch refactors the handling of Freescale erratum A-008585. Now the
erratum is described in a generic arch_timer_erratum_workaround
structure, and the probe path can iterate over these to detect errata
and enable workarounds.

This will simplify the addition and maintenance of code handling
Hisilicon erratum 161010101.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
[Mark: split patch, correct Kconfig, reword commit message]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
arch/arm64/include/asm/arch_timer.h
drivers/clocksource/Kconfig
drivers/clocksource/arm_arch_timer.c