Lines Matching refs:irq

49 void irq_install_handler(int irq, interrupt_handler_t *handler, void *arg)  in irq_install_handler()  argument
53 if (irq < 0 || irq >= SYS_NUM_IRQS) { in irq_install_handler()
54 printf("irq_install_handler: bad irq number %d\n", irq); in irq_install_handler()
58 if (irq_handlers[irq].handler != NULL) in irq_install_handler()
61 (ulong) irq_handlers[irq].handler); in irq_install_handler()
65 irq_handlers[irq].handler = handler; in irq_install_handler()
66 irq_handlers[irq].arg = arg; in irq_install_handler()
67 irq_handlers[irq].count = 0; in irq_install_handler()
70 unmask_irq(irq); in irq_install_handler()
78 void irq_free_handler(int irq) in irq_free_handler() argument
82 if (irq < 0 || irq >= SYS_NUM_IRQS) { in irq_free_handler()
83 printf("irq_free_handler: bad irq number %d\n", irq); in irq_free_handler()
90 mask_irq(irq); in irq_free_handler()
92 irq_handlers[irq].handler = NULL; in irq_free_handler()
93 irq_handlers[irq].arg = NULL; in irq_free_handler()
103 int irq = hw_irq - 0x20; in do_irq() local
105 if (irq < 0 || irq >= SYS_NUM_IRQS) { in do_irq()
106 printf("do_irq: bad irq number %d\n", irq); in do_irq()
110 if (irq_handlers[irq].handler) { in do_irq()
112 mask_irq(irq); in do_irq()
114 irq_handlers[irq].handler(irq_handlers[irq].arg); in do_irq()
115 irq_handlers[irq].count++; in do_irq()
118 unmask_irq(irq); in do_irq()
119 specific_eoi(irq); in do_irq()
122 if ((irq & 7) != 7) { in do_irq()
124 spurious_irq = irq; in do_irq()
135 int irq; in do_irqinfo() local
145 for (irq = 0; irq < SYS_NUM_IRQS; irq++) { in do_irqinfo()
146 if (irq_handlers[irq].handler != NULL) { in do_irqinfo()
148 irq, in do_irqinfo()
149 (ulong)irq_handlers[irq].handler, in do_irqinfo()
150 (ulong)irq_handlers[irq].arg, in do_irqinfo()
151 irq_handlers[irq].count); in do_irqinfo()