Lines Matching full:irq
7 * HW IRQ controller model
26 * irq handler
40 static bool lock_ignore; /* For the hard fake IRQ, temporarily ignore lock */
71 void hw_irq_ctrl_prio_set(unsigned int irq, unsigned int prio) in hw_irq_ctrl_prio_set() argument
73 irq_prio[irq] = prio; in hw_irq_ctrl_prio_set()
76 uint8_t hw_irq_ctrl_get_prio(unsigned int irq) in hw_irq_ctrl_get_prio() argument
78 return irq_prio[irq]; in hw_irq_ctrl_get_prio()
152 void hw_irq_ctrl_disable_irq(unsigned int irq) in hw_irq_ctrl_disable_irq() argument
154 irq_mask &= ~((uint64_t)1<<irq); in hw_irq_ctrl_disable_irq()
157 int hw_irq_ctrl_is_irq_enabled(unsigned int irq) in hw_irq_ctrl_is_irq_enabled() argument
159 return (irq_mask & ((uint64_t)1 << irq))?1:0; in hw_irq_ctrl_is_irq_enabled()
173 * This is an API between the MCU model/IRQ handling side and the IRQ controller
176 void hw_irq_ctrl_clear_irq(unsigned int irq) in hw_irq_ctrl_clear_irq() argument
178 irq_status &= ~((uint64_t)1<<irq); in hw_irq_ctrl_clear_irq()
179 irq_premask &= ~((uint64_t)1<<irq); in hw_irq_ctrl_clear_irq()
191 void hw_irq_ctrl_enable_irq(unsigned int irq) in hw_irq_ctrl_enable_irq() argument
193 irq_mask |= ((uint64_t)1<<irq); in hw_irq_ctrl_enable_irq()
194 if (irq_premask & ((uint64_t)1<<irq)) { /* if the interrupt is pending */ in hw_irq_ctrl_enable_irq()
195 hw_irq_ctrl_raise_im_from_sw(irq); in hw_irq_ctrl_enable_irq()
199 static inline void hw_irq_ctrl_irq_raise_prefix(unsigned int irq) in hw_irq_ctrl_irq_raise_prefix() argument
201 if (irq < N_IRQS) { in hw_irq_ctrl_irq_raise_prefix()
202 irq_premask |= ((uint64_t)1<<irq); in hw_irq_ctrl_irq_raise_prefix()
204 if (irq_mask & ((uint64_t)1 << irq)) { in hw_irq_ctrl_irq_raise_prefix()
205 irq_status |= ((uint64_t)1<<irq); in hw_irq_ctrl_irq_raise_prefix()
207 } else if (irq == PHONY_HARD_IRQ) { in hw_irq_ctrl_irq_raise_prefix()
215 * This function is meant to be used by either the SW manual IRQ raising
216 * or by HW which wants the IRQ to be raised in one delta cycle from now
218 void hw_irq_ctrl_set_irq(unsigned int irq) in hw_irq_ctrl_set_irq() argument
220 hw_irq_ctrl_irq_raise_prefix(irq); in hw_irq_ctrl_set_irq()
224 * Note that we awake the CPU even if the IRQ is disabled in hw_irq_ctrl_set_irq()
226 * instruction and the CPU is allowed to awake just with the irq in hw_irq_ctrl_set_irq()
238 * We always awake the CPU even if the IRQ was masked, in irq_raising_from_hw_now()
255 void hw_irq_ctrl_raise_im(unsigned int irq) in hw_irq_ctrl_raise_im() argument
257 hw_irq_ctrl_irq_raise_prefix(irq); in hw_irq_ctrl_raise_im()
266 void hw_irq_ctrl_raise_im_from_sw(unsigned int irq) in hw_irq_ctrl_raise_im_from_sw() argument
268 hw_irq_ctrl_irq_raise_prefix(irq); in hw_irq_ctrl_raise_im_from_sw()