Home | History | Annotate | Download | only in ofw

Lines Matching refs:handler

39  * IRQ/FIQ initialisation, claim, release and handler routines
104 * int irq_claim(int irq, irqhandler_t *handler)
106 * Enable an IRQ and install a handler for it.
110 irq_claim(int irq, irqhandler_t *handler, const char *group, const char *name)
116 if (handler == NULL)
117 panic("NULL interrupt handler");
118 if (handler->ih_func == NULL)
119 panic("Interrupt handler does not have a function");
127 irq = handler->ih_num;
134 if (handler->ih_level < 0 || handler->ih_level >= NIPL)
137 evcnt_attach_dynamic(&handler->ih_ev, EVCNT_TYPE_INTR, NULL,
140 /* Attach handler at top of chain */
141 handler->ih_next = irqhandlers[irq];
142 irqhandlers[irq] = handler;
145 * Reset the flags for this handler.
146 * As the handler is now in the chain mark it as active.
148 handler->ih_flags = 0 | IRQ_FLAG_ACTIVE;
155 handler->ih_num = irq;
164 if (handler->ih_level >= 0 && handler->ih_level < NIPL) {
201 * int irq_release(int irq, irqhandler_t *handler)
203 * Disable an IRQ and remove a handler for it.
207 irq_release(int irq, irqhandler_t *handler)
218 irq = handler->ih_num;
224 /* Locate the handler */
228 while (irqhand && handler != irqhand) {
233 /* Remove the handler if located */
239 /* Now the handler has been removed from the chain mark is as inactive */
242 /* Make sure the head of the handler list is active */
251 if (handler->ih_level >= 0 && handler->ih_level < NIPL) {
344 * This routine should be used with caution. A handler should already
363 * Handler for stray interrupts. This gets called if a handler cannot be