From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/6] irqchip: add support for Marvell Orion SoCs
Date: Tue, 11 Jun 2013 16:08:28 +0200 [thread overview]
Message-ID: <51B72F5C.5020806@gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1306111539310.22970@ionos>
On 06/11/13 15:45, Thomas Gleixner wrote:
> On Tue, 11 Jun 2013, Sebastian Hesselbarth wrote:
>> On 06/11/13 15:30, Thomas Gleixner wrote:
>>> On Tue, 11 Jun 2013, Thomas Gleixner wrote:
>>>> On Thu, 6 Jun 2013, Sebastian Hesselbarth wrote:
>>>>> This patch adds an irqchip driver for the main interrupt controller
>>>>> found
>>>>> on Marvell Orion SoCs (Kirkwood, Dove, Orion5x, Discovery Innovation).
>>>>> Corresponding device tree documentation is also added.
>>>>>
>>>>> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
>>>>
>>>> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>>>
>>> Second thoughts:
>>>
>>>> +static void orion_bridge_irq_handler(unsigned int irq, struct irq_desc
>>>> *desc)
>>>> +{
>>>> + struct irq_domain *d = irq_get_handler_data(irq);
>>>> + struct irq_chip_generic *gc = irq_get_domain_generic_chip(d, irq);
>>>> + u32 stat = readl_relaxed(gc->reg_base + ORION_BRIDGE_IRQ_CAUSE) &
>>>> + gc->mask_cache;
>>>
>>> In init you map the first irq of that chip and install the chain
>>> handler for it. Now if that first irq fires, isn't that set in the
>>> cause register as well? And what acks that first irq?
>>
>> It is "acked" by acking all unmasked bridge irqs.
>
> Ok. A comment would be nice.
>
> But what about the bit in of that first irq in the cause register? If
> it's set on entry you call generic_handle_irq() for that as well. So
> if it's set you need to mask it in stat. If not, then it wants a
> comment.
I am not sure I can follow. orion_bridge_irq_init() maps the first
parent irq, i.e. hwirq 0 of orion_irq. The parent irq controller
clears that irq cause when all corresponding chained irqs are
cleared. The chained (bridge) irqs are cleared by
orion_bridge_irq_handler above.
I can put a note to the parent irqchip in orion_irq_init() that we
don't need to clear its cause register, if it is that what you mean?
Sebastian
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
Rob Landley <rob@landley.net>,
John Stultz <john.stultz@linaro.org>,
Russell King <linux@arm.linux.org.uk>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/6] irqchip: add support for Marvell Orion SoCs
Date: Tue, 11 Jun 2013 16:08:28 +0200 [thread overview]
Message-ID: <51B72F5C.5020806@gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1306111539310.22970@ionos>
On 06/11/13 15:45, Thomas Gleixner wrote:
> On Tue, 11 Jun 2013, Sebastian Hesselbarth wrote:
>> On 06/11/13 15:30, Thomas Gleixner wrote:
>>> On Tue, 11 Jun 2013, Thomas Gleixner wrote:
>>>> On Thu, 6 Jun 2013, Sebastian Hesselbarth wrote:
>>>>> This patch adds an irqchip driver for the main interrupt controller
>>>>> found
>>>>> on Marvell Orion SoCs (Kirkwood, Dove, Orion5x, Discovery Innovation).
>>>>> Corresponding device tree documentation is also added.
>>>>>
>>>>> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
>>>>
>>>> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>>>
>>> Second thoughts:
>>>
>>>> +static void orion_bridge_irq_handler(unsigned int irq, struct irq_desc
>>>> *desc)
>>>> +{
>>>> + struct irq_domain *d = irq_get_handler_data(irq);
>>>> + struct irq_chip_generic *gc = irq_get_domain_generic_chip(d, irq);
>>>> + u32 stat = readl_relaxed(gc->reg_base + ORION_BRIDGE_IRQ_CAUSE) &
>>>> + gc->mask_cache;
>>>
>>> In init you map the first irq of that chip and install the chain
>>> handler for it. Now if that first irq fires, isn't that set in the
>>> cause register as well? And what acks that first irq?
>>
>> It is "acked" by acking all unmasked bridge irqs.
>
> Ok. A comment would be nice.
>
> But what about the bit in of that first irq in the cause register? If
> it's set on entry you call generic_handle_irq() for that as well. So
> if it's set you need to mask it in stat. If not, then it wants a
> comment.
I am not sure I can follow. orion_bridge_irq_init() maps the first
parent irq, i.e. hwirq 0 of orion_irq. The parent irq controller
clears that irq cause when all corresponding chained irqs are
cleared. The chained (bridge) irqs are cleared by
orion_bridge_irq_handler above.
I can put a note to the parent irqchip in orion_irq_init() that we
don't need to clear its cause register, if it is that what you mean?
Sebastian
next prev parent reply other threads:[~2013-06-11 14:08 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 16:27 [PATCH 0/6] Marvell Orion SoC irqchip and clocksource Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` [PATCH v3 1/6] irqchip: add support for Marvell Orion SoCs Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-11 8:46 ` Thomas Gleixner
2013-06-11 8:46 ` Thomas Gleixner
2013-06-11 13:30 ` Thomas Gleixner
2013-06-11 13:30 ` Thomas Gleixner
2013-06-11 13:37 ` Sebastian Hesselbarth
2013-06-11 13:37 ` Sebastian Hesselbarth
2013-06-11 13:45 ` Thomas Gleixner
2013-06-11 13:45 ` Thomas Gleixner
2013-06-11 13:45 ` Thomas Gleixner
2013-06-11 14:08 ` Sebastian Hesselbarth [this message]
2013-06-11 14:08 ` Sebastian Hesselbarth
2013-06-11 14:13 ` Thomas Gleixner
2013-06-11 14:13 ` Thomas Gleixner
2013-06-11 14:17 ` Sebastian Hesselbarth
2013-06-11 14:17 ` Sebastian Hesselbarth
2013-06-11 13:48 ` Grant Likely
2013-06-11 13:48 ` Grant Likely
2013-06-11 13:48 ` Grant Likely
2013-06-12 20:48 ` [tip:irq/core] irqchip: Add " tip-bot for Sebastian Hesselbarth
2013-06-06 16:27 ` [PATCH v3 2/6] clocksource: add Marvell Orion SoC timer Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-07 22:03 ` Daniel Lezcano
2013-06-07 22:03 ` Daniel Lezcano
2013-06-06 16:27 ` [PATCH v3 3/6] ARM: dove: move device tree nodes to DT irqchip and clocksource Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` [PATCH v3 4/6] ARM: kirkwood: " Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-07 8:30 ` Thomas Petazzoni
2013-06-07 8:30 ` Thomas Petazzoni
2013-06-07 8:30 ` Thomas Petazzoni
2013-06-07 9:15 ` Sebastian Hesselbarth
2013-06-07 9:15 ` Sebastian Hesselbarth
2013-06-07 9:15 ` Sebastian Hesselbarth
2013-06-07 11:51 ` Sebastian Hesselbarth
2013-06-07 11:51 ` Sebastian Hesselbarth
2013-06-06 16:27 ` [PATCH v3 5/6] ARM: dove: convert " Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` [PATCH v3 6/6] ARM: kirkwood: " Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:27 ` Sebastian Hesselbarth
2013-06-06 16:47 ` [PATCH 0/6] Marvell Orion SoC " Jason Gunthorpe
2013-06-06 16:47 ` Jason Gunthorpe
2013-06-06 16:47 ` Jason Gunthorpe
2013-06-06 17:13 ` Jason Cooper
2013-06-06 17:13 ` Jason Cooper
2013-06-06 17:13 ` Jason Cooper
2013-06-10 9:35 ` [PATCH v4 2/6] clocksource: add Marvell Orion SoC timer Sebastian Hesselbarth
2013-06-10 9:35 ` Sebastian Hesselbarth
2013-06-10 9:35 ` Sebastian Hesselbarth
2013-06-10 16:04 ` Daniel Lezcano
2013-06-10 16:04 ` Daniel Lezcano
2013-06-10 16:31 ` Sebastian Hesselbarth
2013-06-10 16:31 ` Sebastian Hesselbarth
2013-06-10 16:44 ` Daniel Lezcano
2013-06-10 16:44 ` Daniel Lezcano
2013-06-10 16:47 ` Sebastian Hesselbarth
2013-06-10 16:47 ` Sebastian Hesselbarth
2013-06-10 17:06 ` Daniel Lezcano
2013-06-10 17:06 ` Daniel Lezcano
2013-06-10 17:09 ` Jason Cooper
2013-06-10 17:09 ` Jason Cooper
2013-06-10 17:09 ` Jason Cooper
2013-06-10 17:21 ` Daniel Lezcano
2013-06-10 17:21 ` Daniel Lezcano
2013-06-10 17:25 ` Andrew Lunn
2013-06-10 17:25 ` Andrew Lunn
2013-06-11 8:45 ` [PATCH 0/6] Marvell Orion SoC irqchip and clocksource Thomas Gleixner
2013-06-11 8:45 ` Thomas Gleixner
2013-06-11 12:35 ` Ezequiel Garcia
2013-06-11 12:35 ` Ezequiel Garcia
2013-06-11 12:41 ` Sebastian Hesselbarth
2013-06-11 12:41 ` Sebastian Hesselbarth
2013-06-11 13:13 ` Thomas Gleixner
2013-06-11 13:13 ` Thomas Gleixner
2013-06-11 13:13 ` Thomas Gleixner
2013-06-11 13:14 ` Sebastian Hesselbarth
2013-06-11 13:14 ` Sebastian Hesselbarth
2013-06-11 15:27 ` Jason Cooper
2013-06-11 15:27 ` Jason Cooper
2013-06-11 15:27 ` Jason Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B72F5C.5020806@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.