• Fu Wei's avatar
    clocksource: arm_arch_timer: split MMIO timer probing. · c389d701
    Fu Wei authored
    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: default avatarFu Wei <fu.wei@linaro.org>
    [Mark: refactor the probing split]
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    c389d701
arm_arch_timer.c 37.9 KB