diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-07-03 05:32:51 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-03 05:55:12 -0400 |
commit | b9e5b4e6a991a5a6d521f2e20a65835404b4169f (patch) | |
tree | a0ac972faae4bf9133f576d842667bb134190341 /arch/powerpc/sysdev/i8259.c | |
parent | 5a43a066b11ac2fe84cf67307f20b83bea390f83 (diff) |
[POWERPC] Use the genirq framework
This adapts the generic powerpc interrupt handling code, and all of
the platforms except for the embedded 6xx machines, to use the new
genirq framework.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/i8259.c')
-rw-r--r-- | arch/powerpc/sysdev/i8259.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c index 1a3ef1ab9d6e..c2e9465871aa 100644 --- a/arch/powerpc/sysdev/i8259.c +++ b/arch/powerpc/sysdev/i8259.c | |||
@@ -69,11 +69,6 @@ int i8259_irq(struct pt_regs *regs) | |||
69 | return irq + i8259_pic_irq_offset; | 69 | return irq + i8259_pic_irq_offset; |
70 | } | 70 | } |
71 | 71 | ||
72 | int i8259_irq_cascade(struct pt_regs *regs, void *unused) | ||
73 | { | ||
74 | return i8259_irq(regs); | ||
75 | } | ||
76 | |||
77 | static void i8259_mask_and_ack_irq(unsigned int irq_nr) | 72 | static void i8259_mask_and_ack_irq(unsigned int irq_nr) |
78 | { | 73 | { |
79 | unsigned long flags; | 74 | unsigned long flags; |
@@ -129,19 +124,11 @@ static void i8259_unmask_irq(unsigned int irq_nr) | |||
129 | spin_unlock_irqrestore(&i8259_lock, flags); | 124 | spin_unlock_irqrestore(&i8259_lock, flags); |
130 | } | 125 | } |
131 | 126 | ||
132 | static void i8259_end_irq(unsigned int irq) | 127 | static struct irq_chip i8259_pic = { |
133 | { | 128 | .typename = " i8259 ", |
134 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)) | 129 | .mask = i8259_mask_irq, |
135 | && irq_desc[irq].action) | 130 | .unmask = i8259_unmask_irq, |
136 | i8259_unmask_irq(irq); | 131 | .mask_ack = i8259_mask_and_ack_irq, |
137 | } | ||
138 | |||
139 | struct hw_interrupt_type i8259_pic = { | ||
140 | .typename = " i8259 ", | ||
141 | .enable = i8259_unmask_irq, | ||
142 | .disable = i8259_mask_irq, | ||
143 | .ack = i8259_mask_and_ack_irq, | ||
144 | .end = i8259_end_irq, | ||
145 | }; | 132 | }; |
146 | 133 | ||
147 | static struct resource pic1_iores = { | 134 | static struct resource pic1_iores = { |
@@ -207,8 +194,11 @@ void __init i8259_init(unsigned long intack_addr, int offset) | |||
207 | 194 | ||
208 | spin_unlock_irqrestore(&i8259_lock, flags); | 195 | spin_unlock_irqrestore(&i8259_lock, flags); |
209 | 196 | ||
210 | for (i = 0; i < NUM_ISA_INTERRUPTS; ++i) | 197 | for (i = 0; i < NUM_ISA_INTERRUPTS; ++i) { |
211 | irq_desc[offset + i].chip = &i8259_pic; | 198 | set_irq_chip_and_handler(offset + i, &i8259_pic, |
199 | handle_level_irq); | ||
200 | irq_desc[offset + i].status |= IRQ_LEVEL; | ||
201 | } | ||
212 | 202 | ||
213 | /* reserve our resources */ | 203 | /* reserve our resources */ |
214 | setup_irq(offset + 2, &i8259_irqaction); | 204 | setup_irq(offset + 2, &i8259_irqaction); |