Lines Matching refs:tmr

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