/* * linux/arch/m68k/kernel/ints.c -- Linux/m68k general interrupt handling code * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details.
*/
/* * void init_IRQ(void) * * Parameters: None * * Returns: Nothing * * This function should be called during kernel startup to initialize * the IRQ handling routines.
*/
void __init init_IRQ(void)
{ int i;
for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq);
mach_init_IRQ();
}
/** * m68k_setup_auto_interrupt * @handler: called from auto vector interrupts * * setup the handler to be called from auto vector interrupts instead of the * standard do_IRQ(), it will be called with irq numbers in the range * from IRQ_AUTO_1 - IRQ_AUTO_7.
*/ void __init m68k_setup_auto_interrupt(void (*handler)(unsignedint, struct pt_regs *))
{ if (handler)
*auto_irqhandler_fixup = (u32)handler;
flush_icache();
}
/** * m68k_setup_user_interrupt * @vec: first user vector interrupt to handle * @cnt: number of active user vector interrupts * * setup user vector interrupts, this includes activating the specified range * of interrupts, only then these interrupts can be requested (note: this is * different from auto vector interrupts).
*/ void __init m68k_setup_user_interrupt(unsignedint vec, unsignedint cnt)
{ int i;
BUG_ON(IRQ_USER + cnt > NR_IRQS);
m68k_first_user_vec = vec; for (i = 0; i < cnt; i++)
irq_set_chip_and_handler(i, &user_irq_chip, handle_simple_irq);
*user_irqvec_fixup = vec - IRQ_USER;
flush_icache();
}
/** * m68k_setup_irq_controller * @chip: irq chip which controls specified irq * @handle: flow handler which handles specified irq * @irq: first irq to be managed by the controller * @cnt: number of irqs to be managed by the controller * * Change the controller for the specified range of irq, which will be used to * manage these irq. auto/user irq already have a default controller, which can * be changed as well, but the controller probably should use m68k_irq_startup/ * m68k_irq_shutdown.
*/ void m68k_setup_irq_controller(struct irq_chip *chip,
irq_flow_handler_t handle, unsignedint irq, unsignedint cnt)
{ int i;
for (i = 0; i < cnt; i++) {
irq_set_chip(irq + i, chip); if (handle)
irq_set_handler(irq + i, handle);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.