diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2009-01-09 17:49:05 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2009-01-09 17:49:05 -0500 |
commit | d30239a0ef2000cfae6c60f8e870da2d8dba4d22 (patch) | |
tree | 1d78f9da02bdd3e3a8111f58f28f41b2153af3d0 /arch | |
parent | 23faf63123e306b4a134f6d6c501813f6c8599dc (diff) |
powerpc/mpc52xx: Properly update irq_desc when set_type() is called.
The MPC5200 PIC driver doesn't correctly update the .status field of
the irq_desc structure when the set_type hook is called. This patch
adds the required code.
Also cleans up the external IRQ typename field to be something easier
to read (very minor).
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch')
-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 72865e8e4b51..0a093f03c758 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, |