Lines Matching +full:intc +full:- +full:nr +full:- +full:irqs

1 // SPDX-License-Identifier: GPL-2.0+
7 * Yasushi SHOJI <yashi@atmark-techno.com>
38 microblaze_intc_t *intc; variable
52 mask = intc->ier; in enable_one_interrupt()
53 intc->ier = (mask | offset); in enable_one_interrupt()
55 debug("Enable one interrupt irq %x - mask %x,ier %x\n", offset, mask, in enable_one_interrupt()
56 intc->ier); in enable_one_interrupt()
57 debug("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier, in enable_one_interrupt()
58 intc->iar, intc->mer); in enable_one_interrupt()
67 mask = intc->ier; in disable_one_interrupt()
68 intc->ier = (mask & ~offset); in disable_one_interrupt()
70 debug("Disable one interrupt irq %x - mask %x,ier %x\n", irq, mask, in disable_one_interrupt()
71 intc->ier); in disable_one_interrupt()
72 debug("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier, in disable_one_interrupt()
73 intc->iar, intc->mer); in disable_one_interrupt()
83 return -1; in install_interrupt_handler()
87 act->handler = hdlr; in install_interrupt_handler()
88 act->arg = arg; in install_interrupt_handler()
89 act->count = 0; in install_interrupt_handler()
95 act->handler = (interrupt_handler_t *)def_hdlr; in install_interrupt_handler()
96 act->arg = (void *)irq; in install_interrupt_handler()
101 /* initialization interrupt controller - hardware */
104 intc->mer = 0; in intc_init()
105 intc->ier = 0; in intc_init()
106 intc->iar = 0xFFFFFFFF; in intc_init()
107 /* XIntc_Start - hw_interrupt enable and all interrupt enable */ in intc_init()
108 intc->mer = 0x3; in intc_init()
110 debug("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier, in intc_init()
111 intc->iar, intc->mer); in intc_init()
117 const void *blob = gd->fdt_blob; in interrupt_init()
120 debug("INTC: Initialization\n"); in interrupt_init()
123 "xlnx,xps-intc-1.00.a"); in interrupt_init()
124 if (node != -1) { in interrupt_init()
127 return -1; in interrupt_init()
129 debug("INTC: Base addr %lx\n", base); in interrupt_init()
130 intc = (microblaze_intc_t *)base; in interrupt_init()
131 irq_no = fdtdec_get_int(blob, node, "xlnx,num-intr-inputs", 0); in interrupt_init()
132 debug("INTC: IRQ NO %x\n", irq_no); in interrupt_init()
141 return -1; in interrupt_init()
150 /* initialize intc controller */ in interrupt_init()
161 int irqs = intc->ivr; /* find active interrupt */ in interrupt_handler() local
164 struct irq_action *act = vecs + irqs; in interrupt_handler()
166 debug("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier, in interrupt_handler()
167 intc->iar, intc->mer); in interrupt_handler()
171 debug("Interrupt handler on %x line, r14 %x\n", irqs, value); in interrupt_handler()
174 (u32)act->handler, act->count, (u32)act->arg); in interrupt_handler()
175 act->handler(act->arg); in interrupt_handler()
176 act->count++; in interrupt_handler()
178 intc->iar = mask << irqs; in interrupt_handler()
180 debug("Dump INTC reg, isr %x, ier %x, iar %x, mer %x\n", intc->isr, in interrupt_handler()
181 intc->ier, intc->iar, intc->mer); in interrupt_handler()
185 debug("Interrupt handler on %x line, r14 %x\n", irqs, value); in interrupt_handler()
195 puts("\nInterrupt-Information:\n\n" in do_irqinfo()
196 "Nr Routine Arg Count\n" in do_irqinfo()
197 "-----------------------------\n"); in do_irqinfo()
200 if (act->handler != (interrupt_handler_t *)def_hdlr) { in do_irqinfo()
202 (int)act->handler, (int)act->arg, in do_irqinfo()
203 act->count); in do_irqinfo()