Skip to contentSkip to conversation

ARM: tegra: Remove 0, prefix from unit-addresses

PATCH Superseded Thierry Reding 3 participants 8 messages Apr 11, 2016 – Apr 12, 2016 5 messages not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: Remove 0, prefix from unit-addresses

From: Thierry Reding <[email protected]>

When Tegra124 support was first merged the unit-addresses of all devices were listed with a "0," prefix to encode the reg property's second cell. It turns out that this notation is not correct, and the "," separator is only used to separate fields in the unit address (such as the device and function number in PCI devices), not individual cells for addresses with more than one cell.

---
 arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi |   6 +-
 arch/arm/boot/dts/tegra124-jetson-tk1.dts      |  57 ++++++------
 arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi   |   6 +-
 arch/arm/boot/dts/tegra124-nyan-big.dts        |   4 +-
 arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi |   6 +-
 arch/arm/boot/dts/tegra124-nyan-blaze.dts      |   2 +-
 arch/arm/boot/dts/tegra124-nyan.dtsi           |  58 ++++++------
 arch/arm/boot/dts/tegra124-venice2.dts         |  58 ++++++------
 arch/arm/boot/dts/tegra124.dtsi                | 120 ++++++++++++-------------
 9 files changed, 159 insertions(+), 158 deletions(-)
arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi +3 -3
index 2c5cede686dc..accb7055165a 100644
@@ -1,5 +1,5 @@
 / {
-	clock@0,60006000 {
+	clock@60006000 {
 		emc-timings-3 {
 			nvidia,ram-code = <3>;
 
@@ -78,7 +78,7 @@
 		};
 	};
 
-	emc@0,7001b000 {
+	emc@7001b000 {
 		emc-timings-3 {
 			nvidia,ram-code = <3>;
 
@@ -2101,7 +2101,7 @@
 		};
 	};
 
-	memory-controller@0,70019000 {
+	memory-controller@70019000 {
 		emc-timings-3 {
 			nvidia,ram-code = <3>;
 
arch/arm/boot/dts/tegra124-jetson-tk1.dts +29 -28

187 lines not on this page · raw message

arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi +3 -3
index 1a5748d05dda..4458e86b2769 100644
@@ -1,5 +1,5 @@
 / {
-	clock@0,60006000 {
+	clock@60006000 {
 		emc-timings-1 {
 			nvidia,ram-code = <1>;
 
@@ -67,7 +67,7 @@
 		};
 	};
 
-	emc@0,7001b000 {
+	emc@7001b000 {
 		emc-timings-1 {
 			nvidia,ram-code = <1>;
 
@@ -1754,7 +1754,7 @@
 		};
 	};
 
-	memory-controller@0,70019000 {
+	memory-controller@70019000 {
 		emc-timings-1 {
 			nvidia,ram-code = <1>;
 
arch/arm/boot/dts/tegra124-nyan-big.dts +2 -2
index 2d21253ea4e3..67d7cfb32541 100644
@@ -15,7 +15,7 @@
 		ddc-i2c-bus = <&dpaux>;
 	};
 
-	sdhci@0,700b0400 { /* SD Card on this bus */
+	sdhci@700b0400 { /* SD Card on this bus */
 		wp-gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_LOW>;
 	};
 
@@ -26,7 +26,7 @@
 		nvidia,model = "GoogleNyanBig";
 	};
 
-	pinmux@0,70000868 {
+	pinmux@70000868 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinmux_default>;
 
arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi +3 -3
index 9ecd108f56cf..4e7b59e25728 100644
@@ -1,5 +1,5 @@
 / {
-	clock@0,60006000 {
+	clock@60006000 {
 		emc-timings-1 {
 			nvidia,ram-code = <1>;
 
@@ -67,7 +67,7 @@
 		};
 	};
 
-	emc@0,7001b000 {
+	emc@7001b000 {
 		emc-timings-1 {
 			nvidia,ram-code = <1>;
 
@@ -1754,7 +1754,7 @@
 		};
 	};
 
-	memory-controller@0,70019000 {
+	memory-controller@70019000 {
 		emc-timings-1 {
 			nvidia,ram-code = <1>;
 
arch/arm/boot/dts/tegra124-nyan-blaze.dts +1 -1
index 0d30c514ffad..c9582361c26e 100644
@@ -22,7 +22,7 @@
 		nvidia,model = "GoogleNyanBlaze";
 	};
 
-	pinmux@0,70000868 {
+	pinmux@70000868 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinmux_default>;
 
arch/arm/boot/dts/tegra124-nyan.dtsi +29 -29

190 lines not on this page · raw message

arch/arm/boot/dts/tegra124-venice2.dts +29 -29

184 lines not on this page · raw message

arch/arm/boot/dts/tegra124.dtsi +60 -60

477 lines not on this page · raw message

Signature · 1 line
2.8.0

A message that is not in the archive (sent off-list or not yet received): 1460383271-27306-2-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 10 lines · Thierry Reding

From: Thierry Reding <[email protected]>

When Tegra124 support was first merged the unit-addresses of all devices were listed with a "0," prefix to encode the reg property's second cell. It turns out that this notation is not correct, and the "," separator is only used to separate fields in the unit address (such as the device and function number in PCI devices), not individual cells for addresses with more than one cell.

arch/arm/boot/dts/tegra124-jetson-tk1.dts line 60

Quoted 6 lines
arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
 
-	gpu@0,57000000 {
+	gpu@57000000 {
  		/*
  		 * Node left disabled on purpose - the bootloader will enable
  		 * it after having set the VPR up

So the bootloader doesn't actually do that for the new node name at present. I have written a patch to make it do so, but haven't sent it yet since I wrote it in the middle of a large cleanup of U-Boot. I expect I can shuffle it to the front of the series and send it soon though. Without a new bootloader that contains this change, IIUC all graphics will be non-operative if this change is applied.

Aside from that,

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 24 lines · Stephen Warren
Quoted 19 lines · Thierry Reding

From: Thierry Reding <[email protected]>

When Tegra124 support was first merged the unit-addresses of all devices were listed with a "0," prefix to encode the reg property's second cell. It turns out that this notation is not correct, and the "," separator is only used to separate fields in the unit address (such as the device and function number in PCI devices), not individual cells for addresses with more than one cell.

arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
 
 
-       gpu@0,57000000 {
+       gpu@57000000 {
                /*
                 * Node left disabled on purpose - the bootloader will
Quoted 2 lines

enable
* it after having set the VPR up

Quoted 6 lines

So the bootloader doesn't actually do that for the new node name at present. I have written a patch to make it do so, but haven't sent it yet since I wrote it in the middle of a large cleanup of U-Boot. I expect I can shuffle it to the front of the series and send it soon though. Without a new bootloader that contains this change, IIUC all graphics will be non-operative if this change is applied.

Then you should leave this one alone for a while.

I also found this looking at u-boot:

arch/arm/dts/tegra124.dtsi: gpu@57000000 {

Sigh...

Rob

A message that is not in the archive (sent off-list or not yet received): CAL_JsqLASP+cytYA7rWn-Ox2W47rkf3t+n3KwBexvBQNc4J_RQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw
Quoted 32 lines · Rob Herring
Quoted 24 lines · Stephen Warren
Quoted 19 lines · Thierry Reding

From: Thierry Reding <[email protected]>

When Tegra124 support was first merged the unit-addresses of all devices were listed with a "0," prefix to encode the reg property's second cell. It turns out that this notation is not correct, and the "," separator is only used to separate fields in the unit address (such as the device and function number in PCI devices), not individual cells for addresses with more than one cell.

arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
 
 
-       gpu@0,57000000 {
+       gpu@57000000 {
                 /*
                  * Node left disabled on purpose - the bootloader will
Quoted 2 lines

enable
* it after having set the VPR up

Quoted 6 lines

So the bootloader doesn't actually do that for the new node name at present. I have written a patch to make it do so, but haven't sent it yet since I wrote it in the middle of a large cleanup of U-Boot. I expect I can shuffle it to the front of the series and send it soon though. Without a new bootloader that contains this change, IIUC all graphics will be non-operative if this change is applied.

Quoted 5 lines

Then you should leave this one alone for a while.

I also found this looking at u-boot:

arch/arm/dts/tegra124.dtsi: gpu@57000000 {

FWIW, that's because the U-Boot DTs use #address-cells=<1> on this chip so there was no question of using commas in the unit address or not. That may have been because U-Boot imported the DTs (or parts of them) from Linux before Linux switched to #address-cells=<2> on this chip.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 35 lines · Stephen Warren
Quoted 34 lines · Rob Herring
Quoted 24 lines · Stephen Warren
Quoted 19 lines · Thierry Reding

From: Thierry Reding <[email protected]>

When Tegra124 support was first merged the unit-addresses of all devices were listed with a "0," prefix to encode the reg property's second cell. It turns out that this notation is not correct, and the "," separator is only used to separate fields in the unit address (such as the device and function number in PCI devices), not individual cells for addresses with more than one cell.

arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
 
 
-       gpu@0,57000000 {
+       gpu@57000000 {
                 /*
                  * Node left disabled on purpose - the bootloader will
Quoted 2 lines

enable
* it after having set the VPR up

Quoted 6 lines

So the bootloader doesn't actually do that for the new node name at present. I have written a patch to make it do so, but haven't sent it yet since I wrote it in the middle of a large cleanup of U-Boot. I expect I can shuffle it to the front of the series and send it soon though. Without a new bootloader that contains this change, IIUC all graphics will be non-operative if this change is applied.

Then you should leave this one alone for a while.

Quoted 8 lines
Quoted 3 lines

I also found this looking at u-boot:

arch/arm/dts/tegra124.dtsi: gpu@57000000 {

FWIW, that's because the U-Boot DTs use #address-cells=<1> on this chip so there was no question of using commas in the unit address or not. That may have been because U-Boot imported the DTs (or parts of them) from Linux before Linux switched to #address-cells=<2> on this chip.

I thought the reason had been that U-Boot didn't support any more than 32-bits for addresses on 32-bit ARM anyway, hence we never bothered to sync with the kernel DTS files regarding #address-cells.

Technically it would be possible for someone to write a DTS file with a GPU node with yet another name (the binding after all doesn't specify what the node name should be) so I think better matching would be safer in any case.

Thierry

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw
Quoted 40 lines · Thierry Reding
Quoted 39 lines · Stephen Warren
Quoted 37 lines · Rob Herring
Quoted 24 lines · Stephen Warren
Quoted 19 lines · Thierry Reding

From: Thierry Reding <[email protected]>

When Tegra124 support was first merged the unit-addresses of all devices were listed with a "0," prefix to encode the reg property's second cell. It turns out that this notation is not correct, and the "," separator is only used to separate fields in the unit address (such as the device and function number in PCI devices), not individual cells for addresses with more than one cell.

arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
 
 
-       gpu@0,57000000 {
+       gpu@57000000 {
                 /*
                  * Node left disabled on purpose - the bootloader will
Quoted 2 lines

enable
* it after having set the VPR up

Quoted 6 lines

So the bootloader doesn't actually do that for the new node name at present. I have written a patch to make it do so, but haven't sent it yet since I wrote it in the middle of a large cleanup of U-Boot. I expect I can shuffle it to the front of the series and send it soon though. Without a new bootloader that contains this change, IIUC all graphics will be non-operative if this change is applied.

Then you should leave this one alone for a while.

I also found this looking at u-boot:

arch/arm/dts/tegra124.dtsi: gpu@57000000 {

Quoted 8 lines
Quoted 4 lines

FWIW, that's because the U-Boot DTs use #address-cells=<1> on this chip so there was no question of using commas in the unit address or not. That may have been because U-Boot imported the DTs (or parts of them) from Linux before Linux switched to #address-cells=<2> on this chip.

I thought the reason had been that U-Boot didn't support any more than 32-bits for addresses on 32-bit ARM anyway, hence we never bothered to sync with the kernel DTS files regarding #address-cells.

Ah yes, there are lots of issues with u-boot around that. That's a wonderful work-around though.

Quoted 4 lines

Technically it would be possible for someone to write a DTS file with a GPU node with yet another name (the binding after all doesn't specify what the node name should be) so I think better matching would be safer in any case.

Strictly speaking, the node name should be part of the binding. We're not too good at specifying it.

I've not looked, but I would think the compatible string would be unique in this case.

Rob

#11 lore raw
In reply to a message not in the archive
Quoted 40 lines · Thierry Reding
Quoted 39 lines · Stephen Warren
Quoted 37 lines · Rob Herring
Quoted 24 lines · Stephen Warren
Quoted 19 lines · Thierry Reding

From: Thierry Reding <[email protected]>

When Tegra124 support was first merged the unit-addresses of all devices were listed with a "0," prefix to encode the reg property's second cell. It turns out that this notation is not correct, and the "," separator is only used to separate fields in the unit address (such as the device and function number in PCI devices), not individual cells for addresses with more than one cell.

arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
 
 
-       gpu@0,57000000 {
+       gpu@57000000 {
                  /*
                   * Node left disabled on purpose - the bootloader will
Quoted 2 lines

enable
* it after having set the VPR up

Quoted 6 lines

So the bootloader doesn't actually do that for the new node name at present. I have written a patch to make it do so, but haven't sent it yet since I wrote it in the middle of a large cleanup of U-Boot. I expect I can shuffle it to the front of the series and send it soon though. Without a new bootloader that contains this change, IIUC all graphics will be non-operative if this change is applied.

Then you should leave this one alone for a while.

I also found this looking at u-boot:

arch/arm/dts/tegra124.dtsi: gpu@57000000 {

Quoted 8 lines
Quoted 4 lines

FWIW, that's because the U-Boot DTs use #address-cells=<1> on this chip so there was no question of using commas in the unit address or not. That may have been because U-Boot imported the DTs (or parts of them) from Linux before Linux switched to #address-cells=<2> on this chip.

I thought the reason had been that U-Boot didn't support any more than 32-bits for addresses on 32-bit ARM anyway, hence we never bothered to sync with the kernel DTS files regarding #address-cells.

Ah, that has also been historically true. It isn't true any more (excepting any latent bugs, which do keep cropping up).

Quoted 4 lines

Technically it would be possible for someone to write a DTS file with a GPU node with yet another name (the binding after all doesn't specify what the node name should be) so I think better matching would be safer in any case.

Yes, that does seem better. I'll try and get that one patch out today, assuming I can rebase it to the bottom of the stack easily. FYI, U-Boot is now on a 2-month release cycle, so the next scheduled release is v2016.05 on May 9, and the merge window just closed for that release. It's arguable this is a bug fix though...

#12 lore raw
In reply to a message not in the archive
Quoted 12 lines · Stephen Warren
Quoted 10 lines · Thierry Reding

From: Thierry Reding <[email protected]>

When Tegra124 support was first merged the unit-addresses of all devices were listed with a "0," prefix to encode the reg property's second cell. It turns out that this notation is not correct, and the "," separator is only used to separate fields in the unit address (such as the device and function number in PCI devices), not individual cells for addresses with more than one cell.

arch/arm/boot/dts/tegra124-jetson-tk1.dts +0 -0
Quoted 12 lines

arch/arm/boot/dts/tegra124-jetson-tk1.dts line 60

Quoted 5 lines
arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
-	gpu@0,57000000 {
+	gpu@57000000 {
  		/*
  		 * Node left disabled on purpose - the bootloader will enable
  		 * it after having set the VPR up

So the bootloader doesn't actually do that for the new node name at present. I have written a patch to make it do so, but haven't sent it yet since I wrote it in the middle of a large cleanup of U-Boot. I expect I can shuffle it to the front of the series and send it soon though. Without a new bootloader that contains this change, IIUC all graphics will be non-operative if this change is applied.

Ah, that's unfortunate. Would it be possible to make the bootloader look at the reg property for the matching, rather than at the node name? That might prevent such issues in the future.

Actually, a match on both the compatible and reg might be necessary. Not that it's likely that there will ever be two devices at the same address but perhaps to make it explicit what type of device is being enabled.

I'll hold off on this until a version of U-Boot is released that will contain a fix for this. Do you think it would make v2016.06?

Thierry