devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Simon Horman <horms@verge.net.au>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2] arm64: dts: renesas: r8a7795: Move nodes which have no reg property out of bus
Date: Wed, 29 Nov 2017 08:36:46 -0600	[thread overview]
Message-ID: <CAL_JsqKZ68Vf781=1dPManAzJ1hm51obT3SE1hx-brSyzphf8w@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdVaL6WeOiZhBU2qfXQK7a9NjshUow2GpJJqkwXywiQmaQ@mail.gmail.com>

On Wed, Nov 29, 2017 at 7:58 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> Hi Rob,
>
> On Wed, Nov 29, 2017 at 2:35 PM, Rob Herring <robh+dt@kernel.org> wrote:
>> On Tue, Nov 28, 2017 at 3:04 AM, Geert Uytterhoeven
>> <geert@linux-m68k.org> wrote:
>>> On Tue, Nov 28, 2017 at 9:56 AM, Simon Horman <horms@verge.net.au> wrote:
>>>> On Mon, Nov 27, 2017 at 12:15:39PM +0100, Geert Uytterhoeven wrote:
>>>>> On Mon, Nov 27, 2017 at 12:04 PM, Simon Horman <horms@verge.net.au> wrote:
>>>>> > I just noticed that with this patch applied I now see:
>>>>> >
>>>>> > arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dtb: Warning (interrupts_property): Missing interrupt-parent for /pmu_a57
>>>>> > arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dtb: Warning (interrupts_property): Missing interrupt-parent for /pmu_a53
>>>>> > arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dtb: Warning (interrupts_property): Missing interrupt-parent for /pmu_a57
>>>>> > arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dtb: Warning (interrupts_property): Missing interrupt-parent for /pmu_a53arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dtb: Warning (interrupts_property): Missing interrupt-parent for /timer
>>>>> >
>>>>> > arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dtb: Warning (interrupts_property): Missing interrupt-parent for /timer
>>>>>
>>>>> Right, the "interrupt-parent = <&gic>;" inside the /soc node applies to child
>>>>> nodes of the /soc node only.
>>>>>
>>>>> You can find this in two ways:
>>>
>>> s/find/fix/
>>>
>>>>>
>>>>>   1. Add "interrupt-parent = <&gic>;" to the /pmu_a57 and /pmu_a53 nodes.
>>>>>   2. Switch those nodes from "interrupt" to "interrupts-extended", e.g. turn
>>>>>
>>>>>         interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
>>>>>
>>>>>      into
>>>>>
>>>>>         interrupts-extended = <&gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
>>>>>
>>>>> The latter is what e.g. arch/arm/boot/dts/armada-375.dtsi does.
>>>>
>>>> Thanks, I took option 1 as it seems consistent with the rest of the
>>>> Renesas DT files. I also added it to the /timer node.
>>>
>>> Actually we recently had a discussion about this on IRC, triggered by a
>>> similar issue in board files (see e.g, Ethernet PHY interrupts).
>>>
>>> Given the following comment:
>>>
>>> drivers/of/irq.c:       /* Try the new-style interrupts-extended first */
>>> drivers/of/irq.c:       res = of_parse_phandle_with_args(device,
>>> "interrupts-extended",
>>>
>>> I think it would be better to use interrupts-extended for individual/isolated
>>> use outside the /soc node.
>>
>> I disagree. There's no point to use interrupts-extended unless you
>> have 2 or more interrupt parents. Just set interrupt-parent in the
>> root node.
>
> The on-SoC devices (all under the /soc node, except for the weird ones without
> reg properties that are now being moved out) all have "&gic" as their interrupt
> parents.
>
> Off-SoC devices use one of the on-SoC interrupt controllers for external
> interrupts ("&irqc", "&irqpin", "&irqpin0", "&irqpin1"), or one of the on-SoC
> GPIO controllers that can also serve external interrupts ("&gpioN").
>
> For the latter, I think interrupts-extended definitely makes sense.
>
> For the former (incl. the "pmu_aN" nodes discussed here), it is debatable.
> But using interrupts-extended makes it easier to catch mistakes in board files,
> as they will be flagged by dtc ("Missing interrupt-parent").
> With interrupt-parent in the root node, they may go undetected.

They would still likely get flagged since the GIC #interrupt-cells is
3 and it is likely you don't have a multiple of 3.

But I guess interrupts-extended does make sense in this case.

Rob

      reply	other threads:[~2017-11-29 14:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24 10:52 [PATCH v2] arm64: dts: renesas: r8a7795: Move nodes which have no reg property out of bus Simon Horman
     [not found] ` <20171124105234.25774-1-horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2017-11-24 11:09   ` Geert Uytterhoeven
     [not found]     ` <CAMuHMdW9V6Bkh5uS9qNA7awtygEs=qRd7jigwSHmpV2VM3n9dA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-27 11:04       ` Simon Horman
2017-11-27 11:15         ` Geert Uytterhoeven
     [not found]           ` <CAMuHMdUm=PiGVWVg9pyNTR5z2WjLcoG1uecBNBeKsSxbAxBt8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-28  8:56             ` Simon Horman
2017-11-28  9:04               ` Geert Uytterhoeven
     [not found]                 ` <CAMuHMdXoDNt7j-hEZmDA2BFFPUAfsi1ukZWowJ3=kTswyYMk5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-29  8:20                   ` Simon Horman
2017-11-29 13:35                   ` Rob Herring
     [not found]                     ` <CAL_JsqKffs+5s92kWFeDivdgk2mVBmHrKuNDCfR9Lb=te5k33A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-29 13:58                       ` Geert Uytterhoeven
2017-11-29 14:36                         ` Rob Herring [this message]

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='CAL_JsqKZ68Vf781=1dPManAzJ1hm51obT3SE1hx-brSyzphf8w@mail.gmail.com' \
    --to=robh+dt@kernel.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.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).