Lines Matching refs:irq
70 * IRQ/FIQ initialisation, claim, release and handler routines
108 * Initialise the IRQ/FIQ sub system
116 /* Clear all the IRQ handlers and the irq block masks */
135 /* Enable IRQ's and FIQ's */
141 * int irq_claim(int irq, irqhandler_t *handler)
143 * Enable an IRQ and install a handler for it.
147 irq_claim(int irq, irqhandler_t *handler, const char *group, const char *name)
159 * IRQ_INSTRUCT indicates that we should get the irq number
160 * from the irq structure
162 if (irq == IRQ_INSTRUCT)
163 irq = handler->ih_num;
165 /* Make sure the irq number is valid */
166 if (irq < 0 || irq >= NIRQS)
178 handler->ih_next = irqhandlers[irq];
179 irqhandlers[irq] = handler;
190 * IRQ number though for the moment they are
192 handler->ih_num = irq;
196 enable_irq(irq);
203 * int irq_release(int irq, irqhandler_t *handler)
205 * Disable an IRQ and remove a handler for it.
209 irq_release(int irq, irqhandler_t *handler)
215 * IRQ_INSTRUCT indicates that we should get the irq number
216 * from the irq structure
218 if (irq == IRQ_INSTRUCT)
219 irq = handler->ih_num;
221 /* Make sure the irq number is valid */
222 if (irq < 0 || irq >= NIRQS)
226 prehand = &irqhandlers[irq];
244 if (irqhandlers[irq])
245 irqhandlers[irq]->ih_flags |= IRQ_FLAG_ACTIVE;
253 * this IRQ.
255 if (irqhandlers[irq] == NULL)
256 disable_irq(irq);
273 int irq, level;
277 /* First, figure out which levels each IRQ uses. */
278 for (irq = 0; irq < NIRQS; irq++) {
280 for (ptr = irqhandlers[irq]; ptr; ptr = ptr->ih_next)
282 irqlevel[irq] = levels;
288 for (irq = 0; irq < NIRQS; irq++)
289 if (irqlevel[irq] & (1 << level))
290 irqs |= 1 << irq;
310 intr_claim(int irq, int level, int (*ih_func)(void *), void *ih_arg, const char *group, const char *name)
320 if (irq_claim(irq, ih, group, name) != 0) {
342 * void disable_irq(int irq)
344 * Disables a specific irq. The irq is removed from the master irq mask
348 disable_irq(int irq)
353 current_mask &= ~(1 << irq);
360 * void enable_irq(int irq)
362 * Enables a specific irq. The irq is added to the master irq mask
368 enable_irq(int irq)
373 current_mask |= (1 << irq);