Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clocksource: arm_arch_timer: add structs to describe MMIO timer

In preparation for ACPI GTDT support, this patch adds structs to
describe the MMIO timers indepedent of the firmware interface.

Subsequent patches will use these to split the FW/HW probing logic, so
that the HW probing logic can be shared by ACPI and DT.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>

authored by

Fu Wei and committed by
Mark Rutland
b3251b8f ca0e1b52

+16
+16
include/clocksource/arm_arch_timer.h
··· 57 57 #define ARCH_TIMER_MEM_PHYS_ACCESS 2 58 58 #define ARCH_TIMER_MEM_VIRT_ACCESS 3 59 59 60 + #define ARCH_TIMER_MEM_MAX_FRAMES 8 61 + 60 62 #define ARCH_TIMER_USR_PCT_ACCESS_EN (1 << 0) /* physical counter */ 61 63 #define ARCH_TIMER_USR_VCT_ACCESS_EN (1 << 1) /* virtual counter */ 62 64 #define ARCH_TIMER_VIRT_EVT_EN (1 << 2) ··· 72 70 struct arch_timer_kvm_info { 73 71 struct timecounter timecounter; 74 72 int virtual_irq; 73 + }; 74 + 75 + struct arch_timer_mem_frame { 76 + bool valid; 77 + phys_addr_t cntbase; 78 + size_t size; 79 + int phys_irq; 80 + int virt_irq; 81 + }; 82 + 83 + struct arch_timer_mem { 84 + phys_addr_t cntctlbase; 85 + size_t size; 86 + struct arch_timer_mem_frame frame[ARCH_TIMER_MEM_MAX_FRAMES]; 75 87 }; 76 88 77 89 #ifdef CONFIG_ARM_ARCH_TIMER