Skip to contentSkip to conversation

ipipe: MPC5200: Fix problem with external interrupts

PATCH In review Stefan Roese 3 participants 3 messages Feb 28, 2013 – Apr 10, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipipe: MPC5200: Fix problem with external interrupts

The MPC5200 external interrupt are not working at all in the Linux context with the current I-pipe support enabled. For example a PCI firewire chip connected to an external interrupt doesn't generate interrupts any more using the Linux FW drivers. With I-pipe disabled or without the current I-pipe patch for the mpc52xx_pic.c file, the external interrupts work just fine.

This patch now introduces the xxx_mask_ack() function for these external interrupts as already done for the other interrupts handled in this driver. With this change, the interrupts work regardless if I-pipe support is enabled or not.

Additionally a small coding style issue has been included (spaces around "-").

Cc Philippe Gerum <[email protected]>
---
 arch/powerpc/platforms/52xx/mpc52xx_pic.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
arch/powerpc/platforms/52xx/mpc52xx_pic.c +11 -1
index 7ed93f8..2c25c4b 100644
@@ -195,10 +195,19 @@ static void mpc52xx_extirq_unmask(struct irq_data *d)
 	hard_local_irq_restore(flags);
 }
 
+static void mpc52xx_extirq_mask_ack(struct irq_data *d)
+{
+	int l2irq = irqd_to_hwirq(d) & MPC52xx_IRQ_L2_MASK;
+
+	__io_be_clrbit(&intr->ctrl, 11 - l2irq);
+	__io_be_setbit(&intr->ctrl, 27 - l2irq);
+}
+
 static void mpc52xx_extirq_ack(struct irq_data *d)
 {
 	int l2irq = irqd_to_hwirq(d) & MPC52xx_IRQ_L2_MASK;
-	__io_be_setbit(&intr->ctrl, 27-l2irq);
+
+	__io_be_setbit(&intr->ctrl, 27 - l2irq);
 }
 
 static int mpc52xx_extirq_set_type(struct irq_data *d, unsigned int flow_type)
@@ -233,6 +242,7 @@ static struct irq_chip mpc52xx_extirq_irqchip = {
 	.name = "MPC52xx External",
 	.irq_mask = mpc52xx_extirq_mask,
 	.irq_unmask = mpc52xx_extirq_unmask,
+	.irq_mask_ack = mpc52xx_extirq_mask_ack,
 	.irq_ack = mpc52xx_extirq_ack,
 	.irq_set_type = mpc52xx_extirq_set_type,
 };
Signature · 1 line
1.8.1.4
#1 lore raw
Quoted 12 lines · Stefan Roese

The MPC5200 external interrupt are not working at all in the Linux context with the current I-pipe support enabled. For example a PCI firewire chip connected to an external interrupt doesn't generate interrupts any more using the Linux FW drivers. With I-pipe disabled or without the current I-pipe patch for the mpc52xx_pic.c file, the external interrupts work just fine.

This patch now introduces the xxx_mask_ack() function for these external interrupts as already done for the other interrupts handled in this driver. With this change, the interrupts work regardless if I-pipe support is enabled or not.

Quoted 5 lines

Additionally a small coding style issue has been included (spaces around "-").

Cc Philippe Gerum <[email protected]>

Philippe, has this patch been forgotten? I can't seem to find it in the core-next branch.

Signature · 1 line
                                                                Gilles.
#2 lore raw
Quoted 17 lines · Gilles Chanteperdrix
Quoted 15 lines · Stefan Roese

The MPC5200 external interrupt are not working at all in the Linux context with the current I-pipe support enabled. For example a PCI firewire chip connected to an external interrupt doesn't generate interrupts any more using the Linux FW drivers. With I-pipe disabled or without the current I-pipe patch for the mpc52xx_pic.c file, the external interrupts work just fine.

This patch now introduces the xxx_mask_ack() function for these external interrupts as already done for the other interrupts handled in this driver. With this change, the interrupts work regardless if I-pipe support is enabled or not.

Additionally a small coding style issue has been included (spaces around "-").

Quoted 7 lines
Quoted 2 lines
Cc Philippe Gerum <[email protected]>

Philippe, has this patch been forgotten? I can't seem to find it in the core-next branch.

Stuck in my todo list. Pushed now, thanks.

Signature · 1 line
Philippe.