All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] [PATCH] ipipe: MPC5200: Fix problem with external interrupts
@ 2013-02-28 16:25 Stefan Roese
  2013-04-09 22:17 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2013-02-28 16:25 UTC (permalink / raw)
  To: xenomai

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 "-").

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Philippe Gerum <rpm@xenomai.org>
---
 arch/powerpc/platforms/52xx/mpc52xx_pic.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 7ed93f8..2c25c4b 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -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,
 };
-- 
1.8.1.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Xenomai] [PATCH] ipipe: MPC5200: Fix problem with external interrupts
  2013-02-28 16:25 [Xenomai] [PATCH] ipipe: MPC5200: Fix problem with external interrupts Stefan Roese
@ 2013-04-09 22:17 ` Gilles Chanteperdrix
  2013-04-10  8:26   ` Philippe Gerum
  0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2013-04-09 22:17 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: Stefan Roese, Xenomai

On 02/28/2013 05:25 PM, Stefan Roese wrote:

> 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 "-").
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Philippe Gerum <rpm@xenomai.org>


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

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai] [PATCH] ipipe: MPC5200: Fix problem with external interrupts
  2013-04-09 22:17 ` Gilles Chanteperdrix
@ 2013-04-10  8:26   ` Philippe Gerum
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Gerum @ 2013-04-10  8:26 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Stefan Roese, Xenomai

On 04/10/2013 12:17 AM, Gilles Chanteperdrix wrote:
> On 02/28/2013 05:25 PM, Stefan Roese wrote:
>
>> 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 "-").
>>
>> Signed-off-by: Stefan Roese <sr@denx.de>
>> Cc: Philippe Gerum <rpm@xenomai.org>
>
>
> 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.

-- 
Philippe.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-10  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-28 16:25 [Xenomai] [PATCH] ipipe: MPC5200: Fix problem with external interrupts Stefan Roese
2013-04-09 22:17 ` Gilles Chanteperdrix
2013-04-10  8:26   ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.