Lines Matching full:ticks
85 const u64 ticks, time64_t *time) in convert_ticks_to_time() argument
87 *time = (u64)div_u64(ticks, priv->timerfreq); in convert_ticks_to_time()
90 /* the time set by the user is converted to "ticks" */
92 time64_t time, u64 *ticks) in convert_time_to_ticks() argument
101 *ticks = (u64)time * (u64)priv->timerfreq; in convert_time_to_ticks()
137 static int set_cascade_timer(struct timer_group_priv *priv, u64 ticks, in set_cascade_timer() argument
154 tmp_ticks = div_u64_rem(ticks, MAX_TICKS_CASCADE, &rem_ticks); in set_cascade_timer()
166 u64 ticks) in get_cascade_timer() argument
174 if (ticks > max_ticks) in get_cascade_timer()
182 /* set ticks to timer */ in get_cascade_timer()
183 ret = set_cascade_timer(priv, ticks, allocated_timer->num); in get_cascade_timer()
195 u64 ticks; in get_timer() local
202 ret = convert_time_to_ticks(priv, time, &ticks); in get_timer()
206 if (ticks > MAX_TICKS) { in get_timer()
210 timer = get_cascade_timer(priv, ticks); in get_timer()
224 /* set ticks & stop timer */ in get_timer()
226 ticks | TIMER_STOP); in get_timer()
292 u64 ticks; in mpic_get_remain_time() local
299 ticks = ((u64)tmp_ticks & UINT_MAX) * (u64)MAX_TICKS_CASCADE; in mpic_get_remain_time()
301 ticks += tmp_ticks; in mpic_get_remain_time()
303 ticks = in_be32(&priv->regs[handle->num].gtccr); in mpic_get_remain_time()
304 ticks &= ~GTCCR_TOG; in mpic_get_remain_time()
307 convert_ticks_to_time(priv, ticks, time); in mpic_get_remain_time()