13 #include <linux/types.h>
15 #include <linux/kernel.h>
21 #include <asm/traps.h>
37 static unsigned int irqebitmap[] = { 0, 1, 4, 7 };
38 static unsigned int inline irq2ebit(
unsigned int irq)
40 return irqebitmap[irq -
EINT0];
54 static unsigned int inline irq2ebit(
unsigned int irq)
67 static void intc_irq_mask(
struct irq_data *
d)
79 static void intc_irq_unmask(
struct irq_data *d)
91 static void intc_irq_ack(
struct irq_data *d)
93 unsigned int ebit = irq2ebit(d->
irq);
98 static unsigned int intc_irq_startup(
struct irq_data *d)
100 unsigned int irq = d->
irq;
103 unsigned int ebit = irq2ebit(irq);
106 #if defined(MCFEPORT_EPDDR)
129 static int intc_irq_set_type(
struct irq_data *d,
unsigned int type)
131 unsigned int ebit, irq = d->
irq;
153 ebit = irq2ebit(irq) * 2;
155 pa = (pa & ~(0x3 << ebit)) | (tb << ebit);
161 static struct irq_chip intc_irq_chip = {
163 .irq_startup = intc_irq_startup,
164 .irq_mask = intc_irq_mask,
165 .irq_unmask = intc_irq_unmask,
168 static struct irq_chip intc_irq_chip_edge_port = {
169 .name =
"CF-INTC-EP",
170 .irq_startup = intc_irq_startup,
171 .irq_mask = intc_irq_mask,
172 .irq_unmask = intc_irq_unmask,
173 .irq_ack = intc_irq_ack,
174 .irq_set_type = intc_irq_set_type,