Lines Matching refs:ticks
86 const u64 ticks, time64_t *time) in convert_ticks_to_time() argument
88 *time = (u64)div_u64(ticks, priv->timerfreq); in convert_ticks_to_time()
93 time64_t time, u64 *ticks) in convert_time_to_ticks() argument
102 *ticks = (u64)time * (u64)priv->timerfreq; in convert_time_to_ticks()
138 static int set_cascade_timer(struct timer_group_priv *priv, u64 ticks, in set_cascade_timer() argument
155 tmp_ticks = div_u64_rem(ticks, MAX_TICKS_CASCADE, &rem_ticks); in set_cascade_timer()
167 u64 ticks) in get_cascade_timer() argument
175 if (ticks > max_ticks) in get_cascade_timer()
184 ret = set_cascade_timer(priv, ticks, allocated_timer->num); in get_cascade_timer()
196 u64 ticks; in get_timer() local
203 ret = convert_time_to_ticks(priv, time, &ticks); in get_timer()
207 if (ticks > MAX_TICKS) { in get_timer()
211 timer = get_cascade_timer(priv, ticks); in get_timer()
227 ticks | TIMER_STOP); in get_timer()
293 u64 ticks; in mpic_get_remain_time() local
300 ticks = ((u64)tmp_ticks & UINT_MAX) * (u64)MAX_TICKS_CASCADE; in mpic_get_remain_time()
302 ticks += tmp_ticks; in mpic_get_remain_time()
304 ticks = in_be32(&priv->regs[handle->num].gtccr); in mpic_get_remain_time()
305 ticks &= ~GTCCR_TOG; in mpic_get_remain_time()
308 convert_ticks_to_time(priv, ticks, time); in mpic_get_remain_time()