From: Florian Fainelli <f.fainelli@gmail.com>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>,
robh+dt@kernel.org, mark.rutland@arm.com, rjui@broadcom.com,
sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com,
linus.walleij@linaro.org
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ARM: dts: NSP: avoid unnecessary probe deferrals
Date: Fri, 25 Oct 2019 10:26:04 -0700 [thread overview]
Message-ID: <5d75b0ba-81c6-3d54-5bef-1127cd1c9998@gmail.com> (raw)
In-Reply-To: <20191025040041.6210-3-chris.packham@alliedtelesis.co.nz>
On 10/24/19 9:00 PM, Chris Packham wrote:
> The pinctrl node is used by the gpioa node. Which may have more
> descendants at a board level. If the pinctrl node isn't probed first the
> gpio is deferred and anything that needs a gpio pin on that chip is also
> deferred.
If what you care is to optimize your boot flow such that no re-probing
occurs, maybe another solution to look at is to re-order the order in
which subsystems are initialized or built (_initcall changes or
drivers/Makefile changes), because changing Device Tree certainly does
not scale over platforms and I recall Rob indicating that he wanted to
introduce randomized platform_device creation from
of_platform_bus_populate() at one point or another.
>
> Normally we and nodes in the device tree to be listed in their natural
> memory mapped address order but putting the pinctrl node first avoids
> the deferral of numerous devices so make an exception in this case.
That is a workaround more than a real solution, though I understand why
you would to do that. One downside is that the entries are no longer in
incrementing register address order and that is visually disturbing and
who knows, maybe a drive by contributor whose pet project will be to
order the Device Tree entries by incrementing addresses will change that
in the future...
>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> arch/arm/boot/dts/bcm-nsp.dtsi | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
> index da6d70f09ef1..dd7a65743c08 100644
> --- a/arch/arm/boot/dts/bcm-nsp.dtsi
> +++ b/arch/arm/boot/dts/bcm-nsp.dtsi
> @@ -172,6 +172,13 @@
> #address-cells = <1>;
> #size-cells = <1>;
>
> + pinctrl: pinctrl@3f1c0 {
> + compatible = "brcm,nsp-pinmux";
> + reg = <0x3f1c0 0x04>,
> + <0x30028 0x04>,
> + <0x3f408 0x04>;
> + };
> +
> gpioa: gpio@20 {
> compatible = "brcm,nsp-gpio-a";
> reg = <0x0020 0x70>,
> @@ -458,13 +465,6 @@
> "sata2";
> };
>
> - pinctrl: pinctrl@3f1c0 {
> - compatible = "brcm,nsp-pinmux";
> - reg = <0x3f1c0 0x04>,
> - <0x30028 0x04>,
> - <0x3f408 0x04>;
> - };
> -
> thermal: thermal@3f2c0 {
> compatible = "brcm,ns-thermal";
> reg = <0x3f2c0 0x10>;
>
--
Florian
next prev parent reply other threads:[~2019-10-25 17:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 4:00 [PATCH 0/2] ARM: bcm: nsp: gpio improvements (hopefully) Chris Packham
2019-10-25 4:00 ` [PATCH 1/2] pinctrl: bcm: nsp: use gpiolib infrastructure for interrupts Chris Packham
2019-10-25 4:00 ` [PATCH 2/2] ARM: dts: NSP: avoid unnecessary probe deferrals Chris Packham
2019-10-25 17:26 ` Florian Fainelli [this message]
2019-10-28 20:21 ` Chris Packham
2019-10-28 21:44 ` Chris Packham
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=5d75b0ba-81c6-3d54-5bef-1127cd1c9998@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rjui@broadcom.com \
--cc=robh+dt@kernel.org \
--cc=sbranden@broadcom.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).