From: Rob Herring <robh@kernel.org>
To: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Tom Rini <trini@konsulko.com>, Kumar Gala <kumar.gala@linaro.org>,
"ksummit-discuss@lists.linuxfoundation.org"
<ksummit-discuss@lists.linuxfoundation.org>,
Rob Herring <rob.herring@linaro.org>,
"devicetree-spec@vger.kernel.org"
<devicetree-spec@vger.kernel.org>,
Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
Andrew Turner <andrew@fubar.geek.nz>,
Grant Likely <grant.likely@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Andy Gross <andy.gross@linaro.org>,
David Gibson <david@gibson.dropbear.id.au>,
Lucas Stach <l.stach@pengutronix.de>
Subject: Re: [Ksummit-discuss] Devicetree Workshop at Kernel Summit Prague (26 Oct 2017)
Date: Fri, 20 Oct 2017 08:37:26 -0500 [thread overview]
Message-ID: <CAL_Jsq+kYCWFR5vSCuvT--N-hHTfFfEVrsv8VHw7PMiyONYs8A@mail.gmail.com> (raw)
In-Reply-To: <fea62563-6629-6d79-06a9-3d17c97ad238@st.com>
On Fri, Oct 20, 2017 at 4:55 AM, Alexandre Torgue
<alexandre.torgue@st.com> wrote:
> Hi Frank,
>
>
> On 10/19/2017 08:46 PM, Frank Rowand wrote:
>> On 10/19/17 07:59, Rob Herring wrote:
>>> On Thu, Oct 19, 2017 at 9:00 AM, Alexandre Torgue
>>> <alexandre.torgue@st.com> wrote:
>>>>
>>>> Hi Rob,
>>>>
>>>>
>>>> On 10/19/2017 01:53 AM, Rob Herring wrote:
>>>>> On Wed, Oct 18, 2017 at 6:28 PM, Andrew Turner <andrew@fubar.geek.nz>
>>>>> wrote:
>>>
>>>
>>> [...]
>>>> -->For example, I want to use the same dtsi files between Linux
>>>> and
>>>> U-boot. If in u-boot dts file I overload several "status" entry by
>>>> "disabled", is it possible that compiler doesn't build it ? And what
>>>> about
>>>> not used phandle ?
>>>
>>>
>>> You certainly could remove disabled nodes in dtc. I'm not sure how
>>> hard it would be to plumb into dtc. I think phandle properties are
>>> already only created if there's a reference to them. If that is
>>
>>
>> Yes, phandles are only created if referenced, unless compiled
>> for loading overlays into:
>>
>
> Are there DTC "extra" options to use to not build those useless phandles ? I
> just tried to revert the dtb to dts (using following command:
> ./scripts/dtc/dtc -I dtb -O dts -o stm32f469-disco-flat.dts
> arch/arm/boot/dts/stm32f469-disco.dtb)
>
> I see that phandles not used are in the dts output file. It is especially an
> issue for pinmux phandles. All pinmux groups possibilities are written
> inside (in my case) stm32f4-pinctrl.dtsi. This file is included in each
> stm32 board dts files, and in those stm32 board dts files only required node
> are enabled. But I see that all pinmux definitions are embedded inside dtb
> binary (even ones not used in board dts file).
Ah, you mean removing nodes without a phandle reference, not phandles
themselves.
There's no way dtc could do that because no reference doesn't equate
to unused. For example, there's no phandle reference to the /memory
node, but that is for sure needed. We would have to add some
annotation to nodes that could be removed if unused. This could be
some source annotation (/delete-if-unused/), some extension to status
property, or some new property.
Another option would be just mark all those nodes disabled and then
postprocess the dtb to mark them okay if they have a phandle property
and delete the node if not.
Rob
next prev parent reply other threads:[~2017-10-20 13:37 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 20:39 Grant Likely
2017-10-14 12:34 ` Thomas Petazzoni
2017-10-17 13:30 ` Grant Likely
2017-10-16 5:36 ` Michal Simek
2017-10-16 14:11 ` Rob Herring
2017-10-18 14:04 ` Michal Simek
2017-10-18 14:28 ` Andre Przywara
2017-10-18 15:32 ` Rob Herring
2017-10-18 16:05 ` Andre Przywara
2017-10-18 16:20 ` Pantelis Antoniou
2017-10-16 16:40 ` Ben Dooks
2017-10-16 18:44 ` Heiko Stübner
2017-10-16 19:45 ` Rob Herring
2017-10-17 13:38 ` Grant Likely
2017-10-17 23:45 ` Frank Rowand
2017-10-17 13:32 ` Grant Likely
2017-10-18 10:08 ` Thomas Petazzoni
2017-10-16 16:42 ` Ben Dooks
2017-10-17 13:34 ` Grant Likely
2017-10-17 9:48 ` Boris Brezillon
2017-10-17 13:21 ` Tom Rini
2017-10-17 13:48 ` Grant Likely
2017-10-17 16:21 ` Ian Lepore
2017-10-17 17:02 ` Kumar Gala
2017-10-17 17:24 ` Geert Uytterhoeven
2017-10-17 19:03 ` Bird, Timothy
2017-10-18 12:14 ` Grant Likely
2017-10-18 12:59 ` Pantelis Antoniou
2017-10-18 13:18 ` Alexandre Belloni
2017-10-18 13:21 ` Geert Uytterhoeven
2017-10-18 17:41 ` Bird, Timothy
2017-10-18 18:00 ` Rob Herring
2017-10-18 21:10 ` Alexandre Belloni
2017-10-18 16:18 ` David Woodhouse
2017-10-18 14:13 ` Rob Herring
2017-10-18 17:45 ` Bird, Timothy
2017-10-18 14:07 ` Kumar Gala
2017-10-17 17:25 ` Rob Herring
2017-10-18 10:11 ` Thomas Petazzoni
2017-10-18 10:35 ` Chen-Yu Tsai
2017-10-18 11:09 ` Mark Brown
2017-10-18 17:59 ` Tom Rini
2017-10-18 23:28 ` Andrew Turner
2017-10-18 23:53 ` Rob Herring
2017-10-19 14:00 ` Alexandre Torgue
2017-10-19 14:59 ` Rob Herring
2017-10-19 18:46 ` Frank Rowand
2017-10-20 9:55 ` Alexandre Torgue
2017-10-20 10:01 ` David Gibson
2017-10-20 13:37 ` Rob Herring [this message]
2017-10-22 8:25 ` David Gibson
2017-10-20 13:47 ` Alexandre Torgue
2017-10-19 0:04 ` Mark Brown
2017-10-19 11:10 ` Grant Likely
2017-10-24 7:37 ` Boris Brezillon
2017-10-25 14:40 ` Maxime Ripard
2017-10-26 5:47 ` Frank Rowand
2017-10-26 7:17 ` 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=CAL_Jsq+kYCWFR5vSCuvT--N-hHTfFfEVrsv8VHw7PMiyONYs8A@mail.gmail.com \
--to=robh@kernel.org \
--cc=alexandre.torgue@st.com \
--cc=andrew@fubar.geek.nz \
--cc=andy.gross@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=devicetree-spec@vger.kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=ksummit-discuss@lists.linuxfoundation.org \
--cc=kumar.gala@linaro.org \
--cc=l.stach@pengutronix.de \
--cc=pantelis.antoniou@konsulko.com \
--cc=rob.herring@linaro.org \
--cc=trini@konsulko.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