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 unsigned int z_clock_hw_cycles_per_sec;
32 __ASSERT(cntfrq_el0 < UINT_MAX,
"cntfrq_el0 cannot fit in system 'unsigned int'");
33 z_clock_hw_cycles_per_sec = (
unsigned 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:65
static ALWAYS_INLINE uint64_t read_cntfrq_el0(void)
Definition lib_helpers.h:59
static ALWAYS_INLINE uint64_t read_cntv_ctl_el0(void)
Definition lib_helpers.h:63
static ALWAYS_INLINE void write_cntv_ctl_el0(uint64_t val)
Definition lib_helpers.h:63
static ALWAYS_INLINE void write_cntv_cval_el0(uint64_t val)
Definition lib_helpers.h:64
#define CNTV_CTL_ENABLE_BIT
Definition cpu.h:85
#define CNTV_CTL_IMASK_BIT
Definition cpu.h:86
static ALWAYS_INLINE uint64_t arm_arch_timer_count(void)
Definition armv7_v8_timer.h:63
static ALWAYS_INLINE void arm_arch_timer_set_irq_mask(bool mask)
Definition armv7_v8_timer.h:48
static ALWAYS_INLINE void arm_arch_timer_set_compare(uint64_t val)
Definition armv7_v8_timer.h:28
static ALWAYS_INLINE void arm_arch_timer_enable(unsigned char enable)
Definition armv7_v8_timer.h:33
static ALWAYS_INLINE void arm_arch_timer_init(void)
Definition armv7_v8_timer.h:24
__UINT64_TYPE__ uint64_t
Definition stdint.h:91