From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/1] of/irq: create interrupts-extended-2 property
Date: Wed, 15 Jan 2014 13:46:53 +0000 [thread overview]
Message-ID: <20140115134653.GF25824@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <20140115124041.GD9558@ns203013.ovh.net>
On Wed, Jan 15, 2014 at 12:40:41PM +0000, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 12:17 Wed 15 Jan , Mark Rutland wrote:
> > On Wed, Jan 15, 2014 at 11:47:25AM +0000, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > The new interrupts-extended property, which reuses the phandle+arguments
> > > pattern used by GPIOs and other core bindings, still have some issue.
> > >
> > > If an SoC have already specifiy interrupt and a board want to add specific
> > > interrupt such as GPIO (which can be optionnal) be need to re-define
> > > interrupts-extended. So allow to have an optionnale interrupts-extended-2
> > > property.
> > >
> >
> > NAK.
> >
> > This is a hack that works around a dts organisation issue. This is _not_
> > a binding or parsing issue.
>
> So the DT is stupid. Yes w have board and SoC information
> so we do not want to duplicate them. Having a way to descript SoC vs board
> specific information need to be provided.
I agree that the current situation isn't fantastic. That doesn't make
the DT stupid. There are other solutions to this problem.
>
> >
> > Properties can be overridden - just describe all of the interrupts in
> > the final dts file.
> this is wrong, which mean you duplicate informaation and duplicate bug and
> fixes
It's certainly not nice, but it doesn't make it wrong.
The same problem can be found with any other list property that varies
per-board. Hacking the parsing of each property is not a solution.
Today the only way to implement what you want is to have the list in the
final file.
One way of working with that would be to have the common interrupts
described in a shared macro in the soc file:
#define SOC_COMMON_INTERRUPTS <&intc1 5 1>, <&intc2 1 0>
Then the soc file can have:
interrupts = SOC_COMMON_INTERRUPTS;
And the board can have:
interrupts = SOC_COMMON_INTERRUPTS, <&intc1 6 1>;
That gains functionality equivalent to your proposal, without
introducing new code or new edge cases in interrupt parsing. However, it
does make it unclear how many interrupts are described, and it won't
interact well with interrupt-names.
Another, more invasive option would be extend the dts syntax and teach
dtc to handle property appending. Then the soc dts could stay as it is,
and the board dts could have something like:
/append-property/ interrupts = <&intc1 6 1>;
/append-property/ interrupt-names = "board-specific-irq";
Both these options solve the issue at the source, are general to other
properties, and allow more than one level of hierarchy (the proposed
interrupts-extended-2 only allows one level).
Thanks,
Mark.
next prev parent reply other threads:[~2014-01-15 13:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 11:47 [RFC PATCH 1/1] of/irq: create interrupts-extended-2 property Jean-Christophe PLAGNIOL-VILLARD
[not found] ` < 20140115161224.GH25824@e106331-lin.cambridge.arm.com>
[not found] ` <20140120224742. EC905C40B12@trevor.secretlab.ca>
[not found] ` < 20140115121750.GE25824@e106331-lin.cambridge.arm.com>
[not found] ` <20140115124041. GD9558@ns203013.ovh.net>
2014-01-15 12:17 ` Mark Rutland
2014-01-15 12:40 ` Jean-Christophe PLAGNIOL-VILLARD
2014-01-15 13:46 ` Mark Rutland [this message]
2014-01-15 14:01 ` Jean-Christophe PLAGNIOL-VILLARD
2014-01-15 15:16 ` Rob Herring
2014-01-15 15:28 ` Rob Herring
2014-01-15 16:12 ` Mark Rutland
2014-01-15 18:08 ` Jean-Christophe PLAGNIOL-VILLARD
2014-01-20 22:47 ` Grant Likely
2014-01-21 1:03 ` Olof Johansson
2014-01-21 8:57 ` David Gibson
2014-01-21 12:02 ` Mark Rutland
2014-01-21 12:46 ` Jean-Christophe PLAGNIOL-VILLARD
2014-01-24 17:39 ` Grant Likely
2014-01-15 14:56 ` Grant Likely
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=20140115134653.GF25824@e106331-lin.cambridge.arm.com \
--to=mark.rutland@arm.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 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).