* [PATCH] arm64: dts: sdm845-mtp: Reserve reserved gpios
@ 2018-11-02 21:45 Bjorn Andersson
2018-11-04 3:15 ` Stephen Boyd
2018-11-04 15:56 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Bjorn Andersson @ 2018-11-02 21:45 UTC (permalink / raw)
To: Andy Gross, David Brown, Rob Herring, Mark Rutland
Cc: linux-arm-msm, linux-soc, devicetree, linux-kernel,
Linus Walleij, Stephen Boyd
With the introduction of commit 3edfb7bd76bd ("gpiolib: Show correct
direction from the beginning") the gpiolib will attempt to read the
direction of all pins, which triggers a read from protected register
regions.
The pins 0 through 3 and 81 through 84 are protected, so mark these as
reserved.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
Given that mainline has not yet booted on the SDM845 MTP or MSM8998 MTP
(which seems to be the affected platform), I think it's better to pick this
change than to rework the offending commit.
arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
index eedfaf8922e2..d667eee4e6d0 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
@@ -352,6 +352,10 @@
status = "okay";
};
+&tlmm {
+ gpio-reserved-ranges = <0 4>, <81 4>;
+};
+
&uart9 {
status = "okay";
};
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: sdm845-mtp: Reserve reserved gpios
2018-11-02 21:45 [PATCH] arm64: dts: sdm845-mtp: Reserve reserved gpios Bjorn Andersson
@ 2018-11-04 3:15 ` Stephen Boyd
2018-11-04 15:56 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2018-11-04 3:15 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, David Brown, Mark Rutland, Rob Herring
Cc: linux-arm-msm, linux-soc, devicetree, linux-kernel,
Linus Walleij, Stephen Boyd
Quoting Bjorn Andersson (2018-11-02 14:45:32)
> With the introduction of commit 3edfb7bd76bd ("gpiolib: Show correct
> direction from the beginning") the gpiolib will attempt to read the
> direction of all pins, which triggers a read from protected register
> regions.
>
> The pins 0 through 3 and 81 through 84 are protected, so mark these as
> reserved.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: sdm845-mtp: Reserve reserved gpios
2018-11-02 21:45 [PATCH] arm64: dts: sdm845-mtp: Reserve reserved gpios Bjorn Andersson
2018-11-04 3:15 ` Stephen Boyd
@ 2018-11-04 15:56 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2018-11-04 15:56 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Andy Gross, David Brown, Rob Herring, Mark Rutland,
linux-arm-msm, open list:ARM/QUALCOMM SUPPORT,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
linux-kernel, Stephen Boyd
On Fri, Nov 2, 2018 at 10:42 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> With the introduction of commit 3edfb7bd76bd ("gpiolib: Show correct
> direction from the beginning") the gpiolib will attempt to read the
> direction of all pins, which triggers a read from protected register
> regions.
>
> The pins 0 through 3 and 81 through 84 are protected, so mark these as
> reserved.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Thanks for fixing this up so elegantly.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-04 15:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 21:45 [PATCH] arm64: dts: sdm845-mtp: Reserve reserved gpios Bjorn Andersson
2018-11-04 3:15 ` Stephen Boyd
2018-11-04 15:56 ` Linus Walleij
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).