clocksource: arm_arch_timer: split dt-only rate handling
authorFu Wei <fu.wei@linaro.org>
Tue, 21 Mar 2017 16:31:13 +0000 (00:31 +0800)
committerMark Rutland <mark.rutland@arm.com>
Wed, 19 Apr 2017 15:11:37 +0000 (16:11 +0100)
commit5d3dfa96c7a202f3a70ebeb6f8bb5005c1547250
tree7f39f9203a83ad19916378ef7775c64aa4af6622
parent4502b6bb720d7a519c4cea76cf68a2425b481a45
clocksource: arm_arch_timer: split dt-only rate handling

For historical reasons, rate detection when probing via DT is somewhat
convoluted. We tried to package this up in arch_timer_detect_rate(), but
with the addition of ACPI worse, and gets in the way of stringent rate
checking when ACPI is used.

This patch makes arch_timer_detect_rate() specific to DT, ripping out
ACPI logic. In preparation for rework of the MMIO timer probing, the
reading of the relevant CNTFRQ register is factored out to callers. The
function is then renamed to arch_timer_of_configure_rate(), which better
represents its new place in the world.

Comments are added in the DT and ACPI probe paths to explain this.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
[Mark: reword commit message]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
drivers/clocksource/arm_arch_timer.c