From: Mason <slash.tmp@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Marc Zyngier <marc.zyngier@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Mark Rutland <mark.rutland@arm.com>,
Thibaud Cornic <thibaud_cornic@sigmadesigns.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH v1] irqchip: Add support for tango interrupt router
Date: Tue, 11 Jul 2017 17:56:56 +0200 [thread overview]
Message-ID: <d8a4d8ad-a9f3-07eb-9e2a-a4bbec01961e@free.fr> (raw)
In-Reply-To: <20170606175219.34ef62b9@free-electrons.com>
On 06/06/2017 17:52, Thomas Petazzoni wrote:
> On Tue, 6 Jun 2017 15:42:36 +0200, Mason wrote:
>
>> + interrupt-controller@6f800 {
>> + compatible = "sigma,smp8759-intc";
>> + reg = <0x6f800 0x430>;
>> + interrupt-controller;
>> + #interrupt-cells = <2>;
>> + interrupt-parent = <&gic>;
>> + /*
>> + * There probably is a better way than explicitly listing
>> + * the 24 interrupts?
>> + */
>
> What we do on Marvell platforms is:
>
> marvell,spi-base = <128>, <136>, <144>, <152>;
>
> see marvell,odmi-controller.txt.
>
> In another driver I submitted, we're doing:
>
> marvell,spi-ranges = <64 64>, <288 64>;
>
> Retrospectively, I would have preferred to use marvell,spi-ranges for
> the first DT binding as well, since it allows to express both the base
> and number of interrupts available in the range.
Sorry for the delay, I got distracted by other drivers
(PCIe, clkgen, i2c, infrared).
Thanks for the suggestion.
So, if I remove the "interrupts" property from the controller's
DT node, I can no longer use irq_of_parse_and_map() followed by
irqd_set_trigger_type(), right?
I would have to "emulate" irq_of_parse_and_map() with
something along the lines of:
#include <dt-bindings/interrupt-controller/arm-gic.h>
static int __init map_irq(struct device_node *gic, int irq, int type)
{
struct of_phandle_args data = { gic, 3, { GIC_SPI, irq, type }};
return irq_create_of_mapping(&data);
}
Then map all 24 interrupts at init:
virq = map_irq(gic, 0, IRQ_TYPE_LEVEL_HIGH);
for (i = 1; i < 24; ++i)
virq = map_irq(gic, i, IRQ_TYPE_EDGE_RISING);
Is that correct?
Does it make sense to use a separate ISR for the two kinds
of interrupts?
Regards.
next prev parent reply other threads:[~2017-07-11 15:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 13:42 [RFC PATCH v1] irqchip: Add support for tango interrupt router Mason
2017-06-06 15:52 ` Thomas Petazzoni
2017-07-11 15:56 ` Mason [this message]
2017-07-12 16:39 ` [RFC PATCH v2] " Mason
2017-07-15 13:06 ` Mason
2017-07-15 23:46 ` Mason
2017-07-17 15:36 ` [RFC PATCH v3] " Mason
2017-07-17 21:22 ` Mason
2017-07-18 14:21 ` [PATCH v4] " Mason
2017-07-25 15:26 ` [PATCH v5] " Mason
2017-08-01 16:56 ` [PATCH v6] " Mason
2017-08-07 12:47 ` Marc Zyngier
2017-08-20 17:22 ` Mason
2017-08-21 16:13 ` Mason
2017-08-23 10:58 ` Marc Zyngier
2017-08-23 15:45 ` Mason
2017-08-28 13:58 ` [PATCH v7] irqchip: Add support for tango interrupt mapper Mason
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=d8a4d8ad-a9f3-07eb-9e2a-a4bbec01961e@free.fr \
--to=slash.tmp@free.fr \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=tglx@linutronix.de \
--cc=thibaud_cornic@sigmadesigns.com \
--cc=thomas.petazzoni@free-electrons.com \
/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 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).