Skip to contentSkip to conversation

omap: Fix broken address translation for pbias

PATCH In review Kishon Vijay Abraham I 2 participants 7 messages Sep 3, 2015 – Sep 4, 2015 Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover omap: Fix broken address translation for pbias

pbias device stopped having memory resource after
"ARM: dts: <platform>: add minimal l4 bus layout with control module support" got merged. This results in platform_get_resource returning -EINVAL in pbias driver. This is because address translation fails while trying to convert the address to resource which happens during the device creation process during boot up.

Even though after [1], reg property in pbias dt node is un-used, it might be an issue if we plan to use it at a later point of time.

Patch series is created on top of [1].

[1] -> https://lkml.org/lkml/2015/9/3/51

Verified the address in omap4 panda, omap5 uevm and dra72 boards.

Kishon Vijay Abraham I (4):
ARM: dts: omap24xx: fix address translation for pbias
ARM: dts: omap4: fix address translation for pbias
ARM: dts: omap5: fix address translation for pbias
ARM: dts: dra7: fix address translation for pbias

 arch/arm/boot/dts/dra7.dtsi     |    1 +
 arch/arm/boot/dts/omap2430.dtsi |    1 +
 arch/arm/boot/dts/omap4.dtsi    |    1 +
 arch/arm/boot/dts/omap5.dtsi    |    1 +
 4 files changed, 4 insertions(+)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/4 ARM: dts: omap24xx: fix address translation for pbias

commit <72b10ac00eb1> ("ARM: dts: omap24xx: add minimal l4 bus layout with control module support") moved pbias_regulator dt node from being a child node of ocp to be the child node of scm_conf. Since scm_conf doesn't have the 'ranges' property, address translation fails while trying to convert the address to resource. Fix it here.

Fixes 72b10ac00eb1 ("ARM: dts: omap24xx: add minimal l4 bus

layout with control module support")

---
 arch/arm/boot/dts/omap2430.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/omap2430.dtsi +1 -0
index 3961a6f..798dda0 100644
@@ -56,6 +56,7 @@
 					reg = <0x270 0x240>;
 					#address-cells = <1>;
 					#size-cells = <1>;
+					ranges = <0 0x270 0x240>;
 
 					scm_clocks: clocks {
 						#address-cells = <1>;
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/4 ARM: dts: omap4: fix address translation for pbias

In reply to Kishon Vijay Abraham I

commit <7415b0b4c645> ("ARM: dts: omap4: add minimal l4 bus layout with control module support") moved pbias_regulator dt node from being a child node of ocp to be the child node of omap4_padconf_global. Since omap4_padconf_global doesn't have the 'ranges' property, address translation fails while trying to convert the address to resource. Fix it here.

Fixes 7415b0b4c645 ("ARM: dts: omap4: add minimal l4 bus layout

with control module support")

---
 arch/arm/boot/dts/omap4.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/omap4.dtsi +1 -0
index 5aad7f3..5a206c1 100644
@@ -196,6 +196,7 @@
 					reg = <0x5a0 0x170>;
 					#address-cells = <1>;
 					#size-cells = <1>;
+					ranges = <0 0x5a0 0x170>;
 
 					pbias_regulator: pbias_regulator {
 						compatible = "ti,pbias-omap4", "ti,pbias-omap";
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/4 ARM: dts: omap5: fix address translation for pbias

In reply to Kishon Vijay Abraham I

commit <ed8509edddeb> ("ARM: dts: omap5: add minimal l4 bus layout with control module support") moved pbias_regulator dt node from being a child node of ocp to be the child node of omap5_padconf_global. Since omap5_padconf_global doesn't have the 'ranges' property, address translation fails while trying to convert the address to resource. Fix it here.

Fixes ed8509edddeb ("ARM: dts: omap5: add minimal l4 bus

layout with control module support")

---
 arch/arm/boot/dts/omap5.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/omap5.dtsi +1 -0
index 76ef595..dd7a0e8 100644
@@ -185,6 +185,7 @@
 					reg = <0x5a0 0xec>;
 					#address-cells = <1>;
 					#size-cells = <1>;
+					ranges = <0 0x5a0 0xec>;
 
 					pbias_regulator: pbias_regulator {
 						compatible = "ti,pbias-omap5", "ti,pbias-omap";
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 4/4 ARM: dts: dra7: fix address translation for pbias

In reply to Kishon Vijay Abraham I

commit <d919501feffa> ("ARM: dts: dra7: add minimal l4 bus layout with control module support") moved pbias_regulator dt node from being a child node of ocp to be the child node of scm_conf. Since scm_conf doesn't have the 'ranges' property, address translation fails while trying to convert the address to resource. Fix it here.

Fixes d919501feffa ("ARM: dts: dra7: add minimal l4 bus

layout with control module support")

---
 arch/arm/boot/dts/dra7.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/dra7.dtsi +1 -0
index d6bc6db..5896896 100644
@@ -120,6 +120,7 @@
 					reg = <0x0 0x1400>;
 					#address-cells = <1>;
 					#size-cells = <1>;
+					ranges = <0 0x0 0x1400>;
 
 					pbias_regulator: pbias_regulator {
 						compatible = "ti,pbias-dra7", "ti,pbias-omap";
Signature · 1 line
1.7.9.5
#5 lore raw
In reply to Kishon Vijay Abraham I
Quoted 7 lines · Kishon Vijay Abraham I

pbias device stopped having memory resource after
"ARM: dts: <platform>: add minimal l4 bus layout with control module support" got merged. This results in platform_get_resource returning -EINVAL in pbias driver. This is because address translation fails while trying to convert the address to resource which happens during the device creation process during boot up.

Quoted 8 lines

Even though after [1], reg property in pbias dt node is un-used, it might be an issue if we plan to use it at a later point of time.

Patch series is created on top of [1].

[1] -> https://lkml.org/lkml/2015/9/3/51

Verified the address in omap4 panda, omap5 uevm and dra72 boards.

Your other series is obviously needed for v4.3.. But seems these are also needed for stable? If so, which versions, v4.2+?

Can you please just do a single patch with multiple Fixes tags as they fix regression for multiple commits? Doing tons of one liner patches for the same thing just creates commit log noise..

Remember to not Cc stable when posting, I'll add that tag when committing if needed.

Regards,

Tony

#6 lore raw

Hi Tony,

Quoted 11 lines · Tony Lindgren
Quoted 10 lines · Kishon Vijay Abraham I

pbias device stopped having memory resource after
"ARM: dts: <platform>: add minimal l4 bus layout with control module support" got merged. This results in platform_get_resource returning -EINVAL in pbias driver. This is because address translation fails while trying to convert the address to resource which happens during the device creation process during boot up.

Even though after [1], reg property in pbias dt node is un-used, it might be an issue if we plan to use it at a later point of time.

Quoted 8 lines
Quoted 5 lines

Patch series is created on top of [1].

[1] -> https://lkml.org/lkml/2015/9/3/51

Verified the address in omap4 panda, omap5 uevm and dra72 boards.

Your other series is obviously needed for v4.3.. But seems these are also needed for stable? If so, which versions, v4.2+?

Both the series are needed from v4.1+. However since the 'reg' property is not going to be used, I'm not sure if this series has to be marked for stable.

Quoted 4 lines

Can you please just do a single patch with multiple Fixes tags as they fix regression for multiple commits? Doing tons of one liner patches for the same thing just creates commit log noise..

Sure.

Quoted 3 lines

Remember to not Cc stable when posting, I'll add that tag when committing if needed.

Sure.

Thanks
Kishon