Lines Matching refs:timer
68 static inline void timerblock_set_count(struct ptimer_state *timer, in timerblock_set_count() argument
75 *count = ptimer_get_limit(timer); in timerblock_set_count()
77 ptimer_set_count(timer, *count); in timerblock_set_count()
81 static inline void timerblock_run(struct ptimer_state *timer, in timerblock_run() argument
85 ptimer_run(timer, !(control & 2)); in timerblock_run()
96 ptimer_get_limit(tb->timer) == 0) { in timerblock_tick()
97 ptimer_stop(tb->timer); in timerblock_tick()
109 return ptimer_get_limit(tb->timer); in timerblock_read()
111 return ptimer_get_count(tb->timer); in timerblock_read()
128 ptimer_transaction_begin(tb->timer); in timerblock_write()
133 ptimer_stop(tb->timer); in timerblock_write()
135 ptimer_set_limit(tb->timer, value, 1); in timerblock_write()
136 timerblock_run(tb->timer, control, value); in timerblock_write()
137 ptimer_transaction_commit(tb->timer); in timerblock_write()
140 ptimer_transaction_begin(tb->timer); in timerblock_write()
145 (!(control & 2) || ptimer_get_limit(tb->timer) == 0)) { in timerblock_write()
146 ptimer_stop(tb->timer); in timerblock_write()
148 timerblock_set_count(tb->timer, control, &value); in timerblock_write()
149 timerblock_run(tb->timer, control, value); in timerblock_write()
150 ptimer_transaction_commit(tb->timer); in timerblock_write()
153 ptimer_transaction_begin(tb->timer); in timerblock_write()
155 ptimer_stop(tb->timer); in timerblock_write()
158 ptimer_set_period(tb->timer, timerblock_scale(value)); in timerblock_write()
161 uint64_t count = ptimer_get_count(tb->timer); in timerblock_write()
164 timerblock_set_count(tb->timer, value, &count); in timerblock_write()
166 timerblock_run(tb->timer, value, count); in timerblock_write()
169 ptimer_transaction_commit(tb->timer); in timerblock_write()
221 if (tb->timer) { in timerblock_reset()
222 ptimer_transaction_begin(tb->timer); in timerblock_reset()
223 ptimer_stop(tb->timer); in timerblock_reset()
224 ptimer_set_limit(tb->timer, 0, 1); in timerblock_reset()
225 ptimer_set_period(tb->timer, timerblock_scale(0)); in timerblock_reset()
226 ptimer_transaction_commit(tb->timer); in timerblock_reset()
272 tb->timer = ptimer_init(timerblock_tick, tb, PTIMER_POLICY); in arm_mptimer_realize()
287 VMSTATE_PTIMER(timer, TimerBlock),