Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+7 -1
+7 -1
arch/powerpc/platforms/52xx/mpc52xx_pic.c
··· 196 196 197 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 200 u32 ctrl_reg, type; 200 201 int irq; 201 202 int l2irq; ··· 223 222 type = 0; 224 223 } 225 224 225 + desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); 226 + desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; 227 + if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) 228 + desc->status |= IRQ_LEVEL; 229 + 226 230 ctrl_reg = in_be32(&intr->ctrl); 227 231 ctrl_reg &= ~(0x3 << (22 - (l2irq * 2))); 228 232 ctrl_reg |= (type << (22 - (l2irq * 2))); ··· 237 231 } 238 232 239 233 static struct irq_chip mpc52xx_extirq_irqchip = { 240 - .typename = " MPC52xx IRQ[0-3] ", 234 + .typename = "MPC52xx External", 241 235 .mask = mpc52xx_extirq_mask, 242 236 .unmask = mpc52xx_extirq_unmask, 243 237 .ack = mpc52xx_extirq_ack,