History

ARM/ARM64: arch_timer: add macros for bits in control register

Add macros to describe the bitfields in the ARM architected timer control register to make code easy to understand.

Sudeep KarkadaNagesha committed 13 years ago

Commit 28061751 parent 4a10c2a3 files · +23 −6Browse files

Showing the changes to include/clocksource (1 of 3 files). Show all

Unified · Split

include/clocksource/arm_arch_timer.h+8−0
@@ -33,6 +33,14 @@ enum arch_timer_reg { · 32 unmodified lines
3333 #define ARCH_TIMER_MEM_PHYS_ACCESS 2
3434 #define ARCH_TIMER_MEM_VIRT_ACCESS 3
3535
36+#define ARCH_TIMER_USR_PCT_ACCESS_EN (1 << 0) /* physical counter */
37+#define ARCH_TIMER_USR_VCT_ACCESS_EN (1 << 1) /* virtual counter */
38+#define ARCH_TIMER_VIRT_EVT_EN (1 << 2)
39+#define ARCH_TIMER_EVT_TRIGGER_SHIFT (4)
40+#define ARCH_TIMER_EVT_TRIGGER_MASK (0xF << ARCH_TIMER_EVT_TRIGGER_SHIFT)
41+#define ARCH_TIMER_USR_VT_ACCESS_EN (1 << 8) /* virtual timer registers */
42+#define ARCH_TIMER_USR_PT_ACCESS_EN (1 << 9) /* physical timer registers */
43+
3644 #ifdef CONFIG_ARM_ARCH_TIMER
3745
3846 extern u32 arch_timer_get_rate(void);