Lines Matching full:tmr

146  * @tmr:	pointer to the gtm_timer structure obtained from gtm_get_timer
151 void gtm_put_timer16(struct gtm_timer *tmr) in gtm_put_timer16() argument
153 gtm_stop_timer16(tmr); in gtm_put_timer16()
155 spin_lock_irq(&tmr->gtm->lock); in gtm_put_timer16()
156 tmr->requested = false; in gtm_put_timer16()
157 spin_unlock_irq(&tmr->gtm->lock); in gtm_put_timer16()
165 static int gtm_set_ref_timer16(struct gtm_timer *tmr, int frequency, in gtm_set_ref_timer16() argument
168 struct gtm *gtm = tmr->gtm; in gtm_set_ref_timer16()
169 int num = tmr - &gtm->timers[0]; in gtm_set_ref_timer16()
178 if (!tmr->gtpsr) in gtm_set_ref_timer16()
209 clrsetbits_8(tmr->gtcfr, ~(GTCFR_STP(num) | GTCFR_RST(num)), in gtm_set_ref_timer16()
212 setbits8(tmr->gtcfr, GTCFR_STP(num)); in gtm_set_ref_timer16()
214 if (tmr->gtpsr) in gtm_set_ref_timer16()
215 out_be16(tmr->gtpsr, psr); in gtm_set_ref_timer16()
216 clrsetbits_be16(tmr->gtmdr, 0xFFFF, iclk | GTMDR_SPS(sps) | in gtm_set_ref_timer16()
218 out_be16(tmr->gtcnr, 0); in gtm_set_ref_timer16()
219 out_be16(tmr->gtrfr, reference_value); in gtm_set_ref_timer16()
220 out_be16(tmr->gtevr, 0xFFFF); in gtm_set_ref_timer16()
223 clrbits8(tmr->gtcfr, GTCFR_STP(num)); in gtm_set_ref_timer16()
232 * @tmr: pointer to the gtm_timer structure obtained from gtm_get_timer
243 int gtm_set_timer16(struct gtm_timer *tmr, unsigned long usec, bool reload) in gtm_set_timer16() argument
258 return gtm_set_ref_timer16(tmr, freq, usec, reload); in gtm_set_timer16()
264 * @tmr: pointer to the gtm_timer structure obtained from gtm_get_timer
279 int gtm_set_exact_timer16(struct gtm_timer *tmr, u16 usec, bool reload) in gtm_set_exact_timer16() argument
291 return gtm_set_ref_timer16(tmr, freq, usec, reload); in gtm_set_exact_timer16()
297 * @tmr: pointer to the gtm_timer structure obtained from gtm_get_timer
302 void gtm_stop_timer16(struct gtm_timer *tmr) in gtm_stop_timer16() argument
304 struct gtm *gtm = tmr->gtm; in gtm_stop_timer16()
305 int num = tmr - &gtm->timers[0]; in gtm_stop_timer16()
310 setbits8(tmr->gtcfr, GTCFR_STP(num)); in gtm_stop_timer16()
311 out_be16(tmr->gtevr, 0xFFFF); in gtm_stop_timer16()
319 * @tmr: pointer to the gtm_timer structure obtained from gtm_get_timer
326 void gtm_ack_timer16(struct gtm_timer *tmr, u16 events) in gtm_ack_timer16() argument
328 out_be16(tmr->gtevr, events); in gtm_ack_timer16()