7#ifndef ZEPHYR_INCLUDE_ARCH_ARM64_TIMER_H_
8#define ZEPHYR_INCLUDE_ARCH_ARM64_TIMER_H_
22#define ARM_ARCH_TIMER_IRQ ARM_TIMER_VIRTUAL_IRQ
23#define ARM_ARCH_TIMER_PRIO ARM_TIMER_VIRTUAL_PRIO
24#define ARM_ARCH_TIMER_FLAGS ARM_TIMER_VIRTUAL_FLAGS
28#ifdef CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME
29 extern int z_clock_hw_cycles_per_sec;
32 __ASSERT(cntfrq_el0 <
INT_MAX,
"cntfrq_el0 cannot fit in system 'int'");
33 z_clock_hw_cycles_per_sec = (int) cntfrq_el0;
51 cntv_ctl &= ~CNTV_CTL_ENABLE_BIT;
66 cntv_ctl &= ~CNTV_CTL_IMASK_BIT;
static ALWAYS_INLINE uint64_t read_cntvct_el0(void)
Definition: lib_helpers.h:64
static ALWAYS_INLINE uint64_t read_cntfrq_el0(void)
Definition: lib_helpers.h:58
static ALWAYS_INLINE uint64_t read_cntv_ctl_el0(void)
Definition: lib_helpers.h:62
static ALWAYS_INLINE void write_cntv_ctl_el0(uint64_t val)
Definition: lib_helpers.h:62
static ALWAYS_INLINE void write_cntv_cval_el0(uint64_t val)
Definition: lib_helpers.h:63
#define CNTV_CTL_ENABLE_BIT
Definition: cpu.h:78
#define CNTV_CTL_IMASK_BIT
Definition: cpu.h:79
static ALWAYS_INLINE uint64_t arm_arch_timer_count(void)
Definition: armv8_timer.h:63
static ALWAYS_INLINE void arm_arch_timer_set_irq_mask(bool mask)
Definition: armv8_timer.h:48
static ALWAYS_INLINE void arm_arch_timer_set_compare(uint64_t val)
Definition: armv8_timer.h:28
static ALWAYS_INLINE void arm_arch_timer_enable(unsigned char enable)
Definition: armv8_timer.h:33
static ALWAYS_INLINE void arm_arch_timer_init(void)
Definition: armv8_timer.h:24
#define ALWAYS_INLINE
Definition: common.h:129
#define INT_MAX
Definition: limits.h:39
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91