All of lore.kernel.org
 help / color / mirror / Atom feed
From: david@gibson.dropbear.id.au (David Gibson)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/1] of/irq: create interrupts-extended-2 property
Date: Tue, 21 Jan 2014 19:57:50 +1100	[thread overview]
Message-ID: <20140121085750.GC21650@voom.redhat.com> (raw)
In-Reply-To: <CAOesGMjrLs9eEPurjUpOfgyexnc__FJkRYmAR84_f7C15HH07Q@mail.gmail.com>

On Mon, Jan 20, 2014 at 05:03:23PM -0800, Olof Johansson wrote:
> On Mon, Jan 20, 2014 at 2:47 PM, Grant Likely <grant.likely@linaro.org> wrote:
> > On Wed, 15 Jan 2014 16:12:24 +0000, Mark Rutland <mark.rutland@arm.com> wrote:
> >> >
> >> > 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).
> >>
> >> I've just had a go at implementing the append-property mechanism above
> >> in dtc, and it was far easier than I expected (patch below).
> >>
> >> Does anyone have any issues with the /append-property/ idea?
> >
> > I think that is reasonable.
> 
> 
> The main problem with this (same for clocks) is if you need to append
> something with a name when the original didn't have any.
> 
> Reordering entries might not work for interrupts, since the bindings
> might have requirements on order.
> 
> I'm not aware of a good solution for this. Suggestions welcome.

So, in principle my preferred way to handle things like this would be
to add richer expression support, including a token for "previous
value" when overlaying.

But although I've recently had another look at it, that's still a ways
off, so I wouldn't object to another approach as a stopgap, as long as
its not too hideous.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140121/a8e3ce63/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Cc: Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Jean-Christophe PLAGNIOL-VILLARD
	<plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: [RFC PATCH 1/1] of/irq: create interrupts-extended-2 property
Date: Tue, 21 Jan 2014 19:57:50 +1100	[thread overview]
Message-ID: <20140121085750.GC21650@voom.redhat.com> (raw)
In-Reply-To: <CAOesGMjrLs9eEPurjUpOfgyexnc__FJkRYmAR84_f7C15HH07Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1969 bytes --]

On Mon, Jan 20, 2014 at 05:03:23PM -0800, Olof Johansson wrote:
> On Mon, Jan 20, 2014 at 2:47 PM, Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> > On Wed, 15 Jan 2014 16:12:24 +0000, Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> wrote:
> >> >
> >> > 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).
> >>
> >> I've just had a go at implementing the append-property mechanism above
> >> in dtc, and it was far easier than I expected (patch below).
> >>
> >> Does anyone have any issues with the /append-property/ idea?
> >
> > I think that is reasonable.
> 
> 
> The main problem with this (same for clocks) is if you need to append
> something with a name when the original didn't have any.
> 
> Reordering entries might not work for interrupts, since the bindings
> might have requirements on order.
> 
> I'm not aware of a good solution for this. Suggestions welcome.

So, in principle my preferred way to handle things like this would be
to add richer expression support, including a token for "previous
value" when overlaying.

But although I've recently had another look at it, that's still a ways
off, so I wouldn't object to another approach as a stopgap, as long as
its not too hideous.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-01-21  8:57 UTC|newest]

Thread overview: 25+ 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
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 15:28           ` Rob Herring
2014-01-15 16:12       ` Mark Rutland
2014-01-15 16:12         ` Mark Rutland
2014-01-15 18:08         ` Jean-Christophe PLAGNIOL-VILLARD
2014-01-15 18:08           ` Jean-Christophe PLAGNIOL-VILLARD
2014-01-20 22:47         ` Grant Likely
2014-01-20 22:47           ` Grant Likely
2014-01-21  1:03           ` Olof Johansson
2014-01-21  1:03             ` Olof Johansson
2014-01-21  8:57             ` David Gibson [this message]
2014-01-21  8:57               ` David Gibson
2014-01-21 12:02             ` Mark Rutland
2014-01-21 12:02               ` Mark Rutland
2014-01-21 12:46               ` Jean-Christophe PLAGNIOL-VILLARD
2014-01-21 12:46                 ` Jean-Christophe PLAGNIOL-VILLARD
2014-01-24 17:39             ` Grant Likely
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=20140121085750.GC21650@voom.redhat.com \
    --to=david@gibson.dropbear.id.au \
    --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.