diff options
Diffstat (limited to 'arch/powerpc/platforms/52xx/mpc52xx_pic.c')
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_pic.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index 72865e8e4b5..0a093f03c75 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
@@ -196,6 +196,7 @@ static void mpc52xx_extirq_ack(unsigned int virq) | |||
196 | 196 | ||
197 | static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type) | 197 | static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type) |
198 | { | 198 | { |
199 | struct irq_desc *desc = get_irq_desc(virq); | ||
199 | u32 ctrl_reg, type; | 200 | u32 ctrl_reg, type; |
200 | int irq; | 201 | int irq; |
201 | int l2irq; | 202 | int l2irq; |
@@ -222,6 +223,11 @@ static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type) | |||
222 | type = 0; | 223 | type = 0; |
223 | } | 224 | } |
224 | 225 | ||
226 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); | ||
227 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; | ||
228 | if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) | ||
229 | desc->status |= IRQ_LEVEL; | ||
230 | |||
225 | ctrl_reg = in_be32(&intr->ctrl); | 231 | ctrl_reg = in_be32(&intr->ctrl); |
226 | ctrl_reg &= ~(0x3 << (22 - (l2irq * 2))); | 232 | ctrl_reg &= ~(0x3 << (22 - (l2irq * 2))); |
227 | ctrl_reg |= (type << (22 - (l2irq * 2))); | 233 | ctrl_reg |= (type << (22 - (l2irq * 2))); |
@@ -231,7 +237,7 @@ static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type) | |||
231 | } | 237 | } |
232 | 238 | ||
233 | static struct irq_chip mpc52xx_extirq_irqchip = { | 239 | static struct irq_chip mpc52xx_extirq_irqchip = { |
234 | .typename = " MPC52xx IRQ[0-3] ", | 240 | .typename = "MPC52xx External", |
235 | .mask = mpc52xx_extirq_mask, | 241 | .mask = mpc52xx_extirq_mask, |
236 | .unmask = mpc52xx_extirq_unmask, | 242 | .unmask = mpc52xx_extirq_unmask, |
237 | .ack = mpc52xx_extirq_ack, | 243 | .ack = mpc52xx_extirq_ack, |