Lines Matching refs:inst

97 static void nhw_GRTC_update_SYSCOUNTER(uint inst);
99 static void nhw_GRTC_update_cc_timer(uint inst, int cc);
100 static void nhw_GRTC_update_all_cc_timers(uint inst);
161 static inline void nhw_GRTC_check_valid_cc_index(uint inst, uint nbr, const char *type) in nhw_GRTC_check_valid_cc_index() argument
163 if ((inst >= NHW_GRTC_TOTAL_INST) || (nbr >= nhw_grtc_st.n_cc) ) { in nhw_GRTC_check_valid_cc_index()
165 type, nbr, nhw_grtc_st.n_cc, inst); in nhw_GRTC_check_valid_cc_index()
169 static inline void nhw_GRTC_check_valid_irq_index(uint inst, uint nbr, const char *type) in nhw_GRTC_check_valid_irq_index() argument
171 if ((inst >= NHW_GRTC_TOTAL_INST) || (nbr >= nhw_grtc_st.n_int) ) { in nhw_GRTC_check_valid_irq_index()
173 type, nbr, nhw_grtc_st.n_int, inst); in nhw_GRTC_check_valid_irq_index()
177 static inline void nhw_GRTC_check_valid_domain_index(uint inst, uint nbr, const char *type) in nhw_GRTC_check_valid_domain_index() argument
179 if ((inst >= NHW_GRTC_TOTAL_INST) || (nbr >= nhw_grtc_st.n_domains) ) { in nhw_GRTC_check_valid_domain_index()
181 type, nbr, nhw_grtc_st.n_domains, inst); in nhw_GRTC_check_valid_domain_index()
186 bs_time_t nhw_GRTC_counter_to_time(uint inst, uint64_t value) { in nhw_GRTC_counter_to_time() argument
187 (void) inst; in nhw_GRTC_counter_to_time()
209 static void nhw_GRTC_update_cc_timer(uint inst, int cc) { in nhw_GRTC_update_cc_timer() argument
210 (void) inst; in nhw_GRTC_update_cc_timer()
213 nhw_grtc_st.CC_timers[cc] = nhw_GRTC_counter_to_time(inst, cc_value); in nhw_GRTC_update_cc_timer()
222 static void nhw_GRTC_update_all_cc_timers(uint inst) { in nhw_GRTC_update_all_cc_timers() argument
224 nhw_GRTC_update_cc_timer(inst, cc); in nhw_GRTC_update_all_cc_timers()
233 static void nhw_GRTC_eval_interrupt(uint inst) in nhw_GRTC_eval_interrupt() argument
235 (void) inst; in nhw_GRTC_eval_interrupt()
271 static void nhw_GRTC_signal_EVENTS_COMPARE(uint inst, uint n) { in nhw_GRTC_signal_EVENTS_COMPARE() argument
273 nhw_GRTC_eval_interrupt(inst); in nhw_GRTC_signal_EVENTS_COMPARE()
279 static void nhw_GRTC_signal_EVENTS_SYSCOUNTERVALID(uint inst) { in nhw_GRTC_signal_EVENTS_SYSCOUNTERVALID() argument
282 nhw_GRTC_eval_interrupt(inst); in nhw_GRTC_signal_EVENTS_SYSCOUNTERVALID()
285 (void) inst; in nhw_GRTC_signal_EVENTS_SYSCOUNTERVALID()
298 static void nhw_GRTC_TASK_START(uint inst) { in nhw_GRTC_TASK_START() argument
299 (void) inst; in nhw_GRTC_TASK_START()
304 nhw_GRTC_signal_EVENTS_SYSCOUNTERVALID(inst); in nhw_GRTC_TASK_START()
307 static void nhw_GRTC_TASK_STOP(uint inst) { in nhw_GRTC_TASK_STOP() argument
308 (void) inst; in nhw_GRTC_TASK_STOP()
313 static void nhw_GRTC_TASK_CLEAR(uint inst) { in nhw_GRTC_TASK_CLEAR() argument
314 (void) inst; in nhw_GRTC_TASK_CLEAR()
324 static void nhw_GRTC_TASK_PWMSTART(uint inst) { in nhw_GRTC_TASK_PWMSTART() argument
326 (void) inst; in nhw_GRTC_TASK_PWMSTART()
329 static void nhw_GRTC_TASK_PWMSTOP(uint inst) { in nhw_GRTC_TASK_PWMSTOP() argument
331 (void) inst; in nhw_GRTC_TASK_PWMSTOP()
335 static inline uint32_t nhw_GRTC_get_SYNCOUNTERL(uint inst) { in nhw_GRTC_get_SYNCOUNTERL() argument
336 (void) inst; in nhw_GRTC_get_SYNCOUNTERL()
344 static inline uint32_t nhw_GRTC_get_SYNCOUNTERH(uint inst) { in nhw_GRTC_get_SYNCOUNTERH() argument
345 (void) inst; in nhw_GRTC_get_SYNCOUNTERH()
349 static void nhw_GRTC_TASK_CAPTURE(uint inst, uint n) { in nhw_GRTC_TASK_CAPTURE() argument
351 nhw_GRTC_update_cc_timer(inst, n); in nhw_GRTC_TASK_CAPTURE()
354 nhw_GRTC_update_SYSCOUNTER(inst); in nhw_GRTC_TASK_CAPTURE()
355 NRF_GRTC_regs.CC[n].CCL = nhw_GRTC_get_SYNCOUNTERL(inst); in nhw_GRTC_TASK_CAPTURE()
356 NRF_GRTC_regs.CC[n].CCH = nhw_GRTC_get_SYNCOUNTERH(inst); in nhw_GRTC_TASK_CAPTURE()
367 void nhw_GRTC_regw_sideeffects_TASKS_CAPTURE(uint inst, uint n) { in nhw_GRTC_regw_sideeffects_TASKS_CAPTURE() argument
370 nhw_GRTC_TASK_CAPTURE(inst, n); in nhw_GRTC_regw_sideeffects_TASKS_CAPTURE()
375 unsigned int inst = (uintptr_t)param >> 16; in nhw_GRTC_taskcapture_wrap() local
377 nhw_GRTC_TASK_CAPTURE(inst, cc_n); in nhw_GRTC_taskcapture_wrap()
380 void nhw_GRTC_regw_sideeffects_SUBSCRIBE_CAPTURE(uint inst, uint cc_n) { in nhw_GRTC_regw_sideeffects_SUBSCRIBE_CAPTURE() argument
383 nhw_GRTC_check_valid_cc_index(inst, cc_n, "SUBSCRIBE_CAPTURE"); in nhw_GRTC_regw_sideeffects_SUBSCRIBE_CAPTURE()
389 (void*)((inst << 16) + cc_n)); in nhw_GRTC_regw_sideeffects_SUBSCRIBE_CAPTURE()
392 void nhw_GRTC_regw_sideeffects_INTEN(uint inst, uint n) { in nhw_GRTC_regw_sideeffects_INTEN() argument
393 nhw_GRTC_check_valid_irq_index(inst, n, "INTEN"); in nhw_GRTC_regw_sideeffects_INTEN()
399 nhw_GRTC_eval_interrupt(inst); in nhw_GRTC_regw_sideeffects_INTEN()
402 void nhw_GRTC_regw_sideeffects_INTENSET(uint inst, uint n) { in nhw_GRTC_regw_sideeffects_INTENSET() argument
403 nhw_GRTC_check_valid_irq_index(inst, n, "INTENSET"); in nhw_GRTC_regw_sideeffects_INTENSET()
411 nhw_GRTC_eval_interrupt(inst); in nhw_GRTC_regw_sideeffects_INTENSET()
415 void nhw_GRTC_regw_sideeffects_INTENCLR(uint inst, uint n) { in nhw_GRTC_regw_sideeffects_INTENCLR() argument
416 nhw_GRTC_check_valid_irq_index(inst, n, "INTENCLR"); in nhw_GRTC_regw_sideeffects_INTENCLR()
426 nhw_GRTC_eval_interrupt(inst); in nhw_GRTC_regw_sideeffects_INTENCLR()
432 static void nhw_GRTC_update_SYSCOUNTER(uint inst) { in NHW_SIDEEFFECTS_EVENTS()
433 (void) inst; in NHW_SIDEEFFECTS_EVENTS()
437 static void nhw_GRTC_check_syscounter_en(uint inst, const char *msg) { in nhw_GRTC_check_syscounter_en() argument
438 (void) inst; in nhw_GRTC_check_syscounter_en()
449 uint32_t nhw_GRTC_regr_sideeffects_SYSCOUNTERL(uint inst, uint n) in nhw_GRTC_regr_sideeffects_SYSCOUNTERL() argument
451 nhw_GRTC_check_syscounter_en(inst, "read SYSCOUNTERL"); in nhw_GRTC_regr_sideeffects_SYSCOUNTERL()
452 nhw_GRTC_check_valid_domain_index(inst, n, "SYSCOUNTERL"); in nhw_GRTC_regr_sideeffects_SYSCOUNTERL()
453 nhw_GRTC_update_SYSCOUNTER(inst); in nhw_GRTC_regr_sideeffects_SYSCOUNTERL()
454 uint32_t value = nhw_GRTC_get_SYNCOUNTERL(inst); in nhw_GRTC_regr_sideeffects_SYSCOUNTERL()
464 uint32_t nhw_GRTC_regr_sideeffects_SYSCOUNTERH(uint inst, uint n) in nhw_GRTC_regr_sideeffects_SYSCOUNTERH() argument
466 nhw_GRTC_check_syscounter_en(inst, "read SYSCOUNTERH"); in nhw_GRTC_regr_sideeffects_SYSCOUNTERH()
467 nhw_GRTC_check_valid_domain_index(inst, n, "SYSCOUNTERH"); in nhw_GRTC_regr_sideeffects_SYSCOUNTERH()
468 nhw_GRTC_update_SYSCOUNTER(inst); in nhw_GRTC_regr_sideeffects_SYSCOUNTERH()
469 uint32_t value = nhw_GRTC_get_SYNCOUNTERH(inst); in nhw_GRTC_regr_sideeffects_SYSCOUNTERH()
482 void nhw_GRTC_regw_sideeffects_CC_CCADD(uint inst, uint cc) { in nhw_GRTC_regw_sideeffects_CC_CCADD() argument
484 nhw_GRTC_check_valid_cc_index(inst, cc, "CC.CCADD"); in nhw_GRTC_regw_sideeffects_CC_CCADD()
491 nhw_GRTC_update_SYSCOUNTER(inst); in nhw_GRTC_regw_sideeffects_CC_CCADD()
501 nhw_GRTC_update_cc_timer(inst, cc); in nhw_GRTC_regw_sideeffects_CC_CCADD()
505 void nhw_GRTC_regw_sideeffects_CC_CCEN(uint inst, uint cc) { in nhw_GRTC_regw_sideeffects_CC_CCEN() argument
506 nhw_GRTC_check_valid_cc_index(inst, cc, "CC.CCEN"); in nhw_GRTC_regw_sideeffects_CC_CCEN()
508 nhw_GRTC_update_cc_timer(inst, cc); in nhw_GRTC_regw_sideeffects_CC_CCEN()
512 void nhw_GRTC_regw_sideeffects_CC_CCL(uint inst, uint cc) { in nhw_GRTC_regw_sideeffects_CC_CCL() argument
513 nhw_GRTC_check_valid_cc_index(inst, cc, "CC.CCL"); in nhw_GRTC_regw_sideeffects_CC_CCL()
516 nhw_GRTC_update_cc_timer(inst, cc); in nhw_GRTC_regw_sideeffects_CC_CCL()
520 void nhw_GRTC_regw_sideeffects_CC_CCH(uint inst, uint cc) { in nhw_GRTC_regw_sideeffects_CC_CCH() argument
521 nhw_GRTC_check_valid_cc_index(inst, cc, "CC.CCH"); in nhw_GRTC_regw_sideeffects_CC_CCH()
525 nhw_GRTC_update_cc_timer(inst, cc); in nhw_GRTC_regw_sideeffects_CC_CCH()
529 static void nhw_GRTC_compare_reached(uint inst, uint cc) { in nhw_GRTC_compare_reached() argument
542 nhw_GRTC_update_cc_timer(inst, cc); in nhw_GRTC_compare_reached()
544 nhw_GRTC_signal_EVENTS_COMPARE(inst, cc); in nhw_GRTC_compare_reached()
548 uint inst = 0, cc; in nhw_GRTC_timer_triggered() local
550 uint inst[NHW_GRTC_TOTAL_INST*NHW_GRTC_N_CC]; in nhw_GRTC_timer_triggered() member
559 match.inst[match.cnt] = inst; in nhw_GRTC_timer_triggered()
566 inst = match.inst[match.cnt]; in nhw_GRTC_timer_triggered()
568 nhw_GRTC_compare_reached(inst ,cc); in nhw_GRTC_timer_triggered()