]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
clocksource: arm_arch_timer: split MMIO timer probing.
authorFu Wei <fu.wei@linaro.org>
Fri, 31 Mar 2017 17:51:00 +0000 (01:51 +0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 17 May 2017 16:40:45 +0000 (13:40 -0300)
commit0ecdf0aa5cc2ed3bd60c97705eb8a7eddb172adc
treec842b71704081859a6bf6b7df7045a165fca556d
parent4315e20d8e84393064e1e3fbfafefc6d1f86ff0f
clocksource: arm_arch_timer: split MMIO timer probing.

BugLink: http://bugs.launchpad.net/bugs/1688114
Currently the code to probe MMIO architected timers mixes DT parsing with
actual poking of hardware. This makes the code harder than necessary to
understand, and makes it difficult to add support for probing via ACPI.

This patch splits the DT parsing from HW probing. The DT parsing now
lives in arch_timer_mem_of_init(), which fills in an arch_timer_mem
structure that it hands to probing functions that can be reused for ACPI
support.

Since the rate detection logic will be slight different when using ACPI,
the probing is performed as a number of steps. This results in more code
for the moment, and some arguably redundant work, but simplifies matters
considerably when ACPI support is added.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
[Mark: refactor the probing split]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
(cherry picked from commit c389d701dfb70154edf896f0f9c40d2857ca2d90)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/clocksource/arm_arch_timer.c