* [PATCH] powerpc/mpc52xx: Properly update irq_desc when set_type() is called.
@ 2009-01-07 19:25 Grant Likely
2009-01-08 3:51 ` Matt Sealey
0 siblings, 1 reply; 7+ messages in thread
From: Grant Likely @ 2009-01-07 19:25 UTC (permalink / raw)
To: linuxppc-dev
From: Grant Likely <grant.likely@secretlab.ca>
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>
---
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 72865e8..0a093f0 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)
static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
{
+ struct irq_desc *desc = get_irq_desc(virq);
u32 ctrl_reg, type;
int irq;
int l2irq;
@@ -222,6 +223,11 @@ static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
type = 0;
}
+ desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
+ desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
+ if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
+ desc->status |= IRQ_LEVEL;
+
ctrl_reg = in_be32(&intr->ctrl);
ctrl_reg &= ~(0x3 << (22 - (l2irq * 2)));
ctrl_reg |= (type << (22 - (l2irq * 2)));
@@ -231,7 +237,7 @@ static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
}
static struct irq_chip mpc52xx_extirq_irqchip = {
- .typename = " MPC52xx IRQ[0-3] ",
+ .typename = "MPC52xx External",
.mask = mpc52xx_extirq_mask,
.unmask = mpc52xx_extirq_unmask,
.ack = mpc52xx_extirq_ack,
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] powerpc/mpc52xx: Properly update irq_desc when set_type() is called.
2009-01-07 19:25 [PATCH] powerpc/mpc52xx: Properly update irq_desc when set_type() is called Grant Likely
@ 2009-01-08 3:51 ` Matt Sealey
2009-01-08 4:53 ` Grant Likely
0 siblings, 1 reply; 7+ messages in thread
From: Matt Sealey @ 2009-01-08 3:51 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> 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>
Hi Grant,
What does this affect?
-- Matt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] powerpc/mpc52xx: Properly update irq_desc when set_type() is called.
2009-01-08 3:51 ` Matt Sealey
@ 2009-01-08 4:53 ` Grant Likely
2009-01-08 14:40 ` Matt Sealey
0 siblings, 1 reply; 7+ messages in thread
From: Grant Likely @ 2009-01-08 4:53 UTC (permalink / raw)
To: Matt Sealey; +Cc: linuxppc-dev
On Wed, Jan 7, 2009 at 8:51 PM, Matt Sealey <matt@genesi-usa.com> wrote:
> Grant Likely wrote:
>>
>> From: Grant Likely <grant.likely@secretlab.ca>
>>
>> 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>
>
> Hi Grant,
>
> What does this affect?
cat /proc/interrupts
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] powerpc/mpc52xx: Properly update irq_desc when set_type() is called.
2009-01-08 4:53 ` Grant Likely
@ 2009-01-08 14:40 ` Matt Sealey
2009-01-09 21:02 ` Grant Likely
0 siblings, 1 reply; 7+ messages in thread
From: Matt Sealey @ 2009-01-08 14:40 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
Grant Likely wrote:
> On Wed, Jan 7, 2009 at 8:51 PM, Matt Sealey <matt@genesi-usa.com> wrote:
>> Grant Likely wrote:
>>> From: Grant Likely <grant.likely@secretlab.ca>
>>>
>>> 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>
>> Hi Grant,
>>
>> What does this affect?
>
> cat /proc/interrupts
Ah so, completely cosmetic in the end. I was worried I'd have to build a
new kernel for a second.. :D
-- Matt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] powerpc/mpc52xx: Properly update irq_desc when set_type() is called.
2009-01-08 14:40 ` Matt Sealey
@ 2009-01-09 21:02 ` Grant Likely
2009-01-10 17:19 ` Matt Sealey
0 siblings, 1 reply; 7+ messages in thread
From: Grant Likely @ 2009-01-09 21:02 UTC (permalink / raw)
To: Matt Sealey; +Cc: linuxppc-dev
On Thu, Jan 8, 2009 at 7:40 AM, Matt Sealey <matt@genesi-usa.com> wrote:
> Grant Likely wrote:
>>
>> On Wed, Jan 7, 2009 at 8:51 PM, Matt Sealey <matt@genesi-usa.com> wrote:
>>>
>>> Grant Likely wrote:
>>>>
>>>> From: Grant Likely <grant.likely@secretlab.ca>
>>>>
>>>> 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>
>>>
>>> Hi Grant,
>>>
>>> What does this affect?
>>
>> cat /proc/interrupts
>
> Ah so, completely cosmetic in the end. I was worried I'd have to build a new
> kernel for a second.. :D
Not entirely; it affects the details about how irqs are handled.
check_irq_resend() for example. I don't think any 5200 platforms
currently care; but it could be an issue with cascaded IRQ handlers.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-01-14 6:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 19:25 [PATCH] powerpc/mpc52xx: Properly update irq_desc when set_type() is called Grant Likely
2009-01-08 3:51 ` Matt Sealey
2009-01-08 4:53 ` Grant Likely
2009-01-08 14:40 ` Matt Sealey
2009-01-09 21:02 ` Grant Likely
2009-01-10 17:19 ` Matt Sealey
[not found] ` <fa686aa40901101425y5ff97f9fgabaa8aa6f0e974c7@mail.gmail.com>
[not found] ` <496AB287.5050508@genesi-usa.com>
[not found] ` <fa686aa40901112156i69611682icf9ef3a7702fd862@mail.gmail.com>
[not found] ` <496C907B.2060609@genesi-usa.com>
[not found] ` <fa686aa40901132203p71bbd6eem2b8173dc8a4e5fc8@mail.gmail.com>
2009-01-14 6:03 ` Fwd: " Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).