Lines Matching full:timer
3 * ARM Generic Timer specific interface
34 static inline uint64_t timer_get_cntct(enum arch_timer timer) in timer_get_cntct() argument
38 switch (timer) { in timer_get_cntct()
44 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_get_cntct()
51 static inline void timer_set_cval(enum arch_timer timer, uint64_t cval) in timer_set_cval() argument
53 switch (timer) { in timer_set_cval()
61 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_set_cval()
67 static inline uint64_t timer_get_cval(enum arch_timer timer) in timer_get_cval() argument
69 switch (timer) { in timer_get_cval()
75 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_get_cval()
82 static inline void timer_set_tval(enum arch_timer timer, int32_t tval) in timer_set_tval() argument
84 switch (timer) { in timer_set_tval()
92 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_set_tval()
98 static inline int32_t timer_get_tval(enum arch_timer timer) in timer_get_tval() argument
101 switch (timer) { in timer_get_tval()
107 GUEST_FAIL("Could not get timer %d\n", timer); in timer_get_tval()
114 static inline void timer_set_ctl(enum arch_timer timer, uint32_t ctl) in timer_set_ctl() argument
116 switch (timer) { in timer_set_ctl()
124 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_set_ctl()
130 static inline uint32_t timer_get_ctl(enum arch_timer timer) in timer_get_ctl() argument
132 switch (timer) { in timer_get_ctl()
138 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_get_ctl()
145 static inline void timer_set_next_cval_ms(enum arch_timer timer, uint32_t msec) in timer_set_next_cval_ms() argument
147 uint64_t now_ct = timer_get_cntct(timer); in timer_set_next_cval_ms()
150 timer_set_cval(timer, next_ct); in timer_set_next_cval_ms()
153 static inline void timer_set_next_tval_ms(enum arch_timer timer, uint32_t msec) in timer_set_next_tval_ms() argument
155 timer_set_tval(timer, msec_to_cycles(msec)); in timer_set_next_tval_ms()