Lines Matching refs:irq
37 * IRQ/FIQ initialisation, claim, release and handler routines
75 * Initialise the IRQ/FIQ sub system
83 /* Clear all the IRQ handlers and the irq block masks */
87 /* Clear the IRQ/FIQ masks in the IOMD */
120 /* Enable IRQ's and FIQ's */
126 * int irq_claim(int irq, irqhandler_t *handler)
128 * Enable an IRQ and install a handler for it.
132 irq_claim(int irq, irqhandler_t *handler)
146 * IRQ_INSTRUCT indicates that we should get the irq number
147 * from the irq structure
149 if (irq == IRQ_INSTRUCT)
150 irq = handler->ih_num;
152 /* Make sure the irq number is valid */
153 if (irq < 0 || irq >= NIRQS)
163 handler->ih_next = irqhandlers[irq];
164 irqhandlers[irq] = handler;
175 * IRQ number though for the moment they are
177 handler->ih_num = irq;
181 char *iptr = _intrnames + (irq * 14);
185 snprintf(iptr, 14, "irq %2d ", irq);
190 * Update the irq masks.
191 * Find the lowest interrupt priority on the irq chain.
200 * Find the lowest interrupt priority on the irq chain.
203 ptr = irqhandlers[irq];
218 irqmasks[max_level] &= ~(1 << irq);
222 irqmasks[level] |= (1 << irq);
235 enable_irq(irq);
244 * int irq_release(int irq, irqhandler_t *handler)
246 * Disable an IRQ and remove a handler for it.
250 irq_release(int irq, irqhandler_t *handler)
257 * IRQ_INSTRUCT indicates that we should get the irq number
258 * from the irq structure
260 if (irq == IRQ_INSTRUCT)
261 irq = handler->ih_num;
263 /* Make sure the irq number is valid */
264 if (irq < 0 || irq >= NIRQS)
268 irqhand = irqhandlers[irq];
269 prehand = &irqhandlers[irq];
286 if (irqhandlers[irq])
287 irqhandlers[irq]->ih_flags |= IRQ_FLAG_ACTIVE;
291 char *iptr = _intrnames + (irq * 14);
292 if (irqhandlers[irq] && irqhandlers[irq]->ih_name) {
293 strlcpy(iptr, irqhandlers[irq]->ih_name, 14);
295 snprintf(iptr, 14, "irq %2d ", irq);
300 * Update the irq masks.
309 irqmasks[level] &= ~(1 << irq);
312 * Find the lowest interrupt priority on the irq chain.
315 ptr = irqhandlers[irq];
324 irqmasks[level] |= (1 << irq);
332 * this IRQ.
334 if (irqhandlers[irq] == NULL)
335 disable_irq(irq);
344 intr_claim(int irq, int level, const char *name, int (*ih_func)(void *),
356 if (irq_claim(irq, ih) != 0) {
405 * void disable_irq(int irq)
407 * Disables a specific irq. The irq is removed from the master irq mask
411 disable_irq(int irq)
416 current_mask &= ~(1 << irq);
423 * void enable_irq(int irq)
425 * Enables a specific irq. The irq is added to the master irq mask
431 enable_irq(int irq)
436 current_mask |= (1 << irq);