Lines Matching refs:tmr
155 void gtm_put_timer16(struct gtm_timer *tmr) in gtm_put_timer16() argument
157 gtm_stop_timer16(tmr); in gtm_put_timer16()
159 spin_lock_irq(&tmr->gtm->lock); in gtm_put_timer16()
160 tmr->requested = false; in gtm_put_timer16()
161 spin_unlock_irq(&tmr->gtm->lock); in gtm_put_timer16()
169 static int gtm_set_ref_timer16(struct gtm_timer *tmr, int frequency, in gtm_set_ref_timer16() argument
172 struct gtm *gtm = tmr->gtm; in gtm_set_ref_timer16()
173 int num = tmr - >m->timers[0]; in gtm_set_ref_timer16()
182 if (!tmr->gtpsr) in gtm_set_ref_timer16()
213 clrsetbits_8(tmr->gtcfr, ~(GTCFR_STP(num) | GTCFR_RST(num)), in gtm_set_ref_timer16()
216 setbits8(tmr->gtcfr, GTCFR_STP(num)); in gtm_set_ref_timer16()
218 if (tmr->gtpsr) in gtm_set_ref_timer16()
219 out_be16(tmr->gtpsr, psr); in gtm_set_ref_timer16()
220 clrsetbits_be16(tmr->gtmdr, 0xFFFF, iclk | GTMDR_SPS(sps) | in gtm_set_ref_timer16()
222 out_be16(tmr->gtcnr, 0); in gtm_set_ref_timer16()
223 out_be16(tmr->gtrfr, reference_value); in gtm_set_ref_timer16()
224 out_be16(tmr->gtevr, 0xFFFF); in gtm_set_ref_timer16()
227 clrbits8(tmr->gtcfr, GTCFR_STP(num)); in gtm_set_ref_timer16()
247 int gtm_set_timer16(struct gtm_timer *tmr, unsigned long usec, bool reload) in gtm_set_timer16() argument
262 return gtm_set_ref_timer16(tmr, freq, usec, reload); in gtm_set_timer16()
283 int gtm_set_exact_timer16(struct gtm_timer *tmr, u16 usec, bool reload) in gtm_set_exact_timer16() argument
295 return gtm_set_ref_timer16(tmr, freq, usec, reload); in gtm_set_exact_timer16()
306 void gtm_stop_timer16(struct gtm_timer *tmr) in gtm_stop_timer16() argument
308 struct gtm *gtm = tmr->gtm; in gtm_stop_timer16()
309 int num = tmr - >m->timers[0]; in gtm_stop_timer16()
314 setbits8(tmr->gtcfr, GTCFR_STP(num)); in gtm_stop_timer16()
315 out_be16(tmr->gtevr, 0xFFFF); in gtm_stop_timer16()
330 void gtm_ack_timer16(struct gtm_timer *tmr, u16 events) in gtm_ack_timer16() argument
332 out_be16(tmr->gtevr, events); in gtm_ack_timer16()