Skip to contentSkip to conversation

ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm

PATCH In review Ian Campbell 3 participants 4 messages Aug 3, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm

The ../../../arm... style cross-references added by commit 9d56c22a7861 ("ARM: bcm2835: Add devicetree for the Raspberry Pi 3.") do not work in the context of the split device-tree repository[0] (where the directory structure differs). As with commit 8ee57b8182c4 ("ARM64: dts: vexpress: Use a symlink to vexpress-v2m-rs1.dtsi from arch=arm") use symlinks instead.

These includes in turn require a skeleton.dtsi to be present, so add one as a real file (with the same contents as arch/arm) rather than a symlink.

[0] https://git.kernel.org/cgit/linux/kernel/git/devicetree/devicetree-rebasing.git/

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Rob Herring <[email protected]>
Cc Frank Rowand <[email protected]>
Cc Eric Anholt <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Lee Jones <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc devicetree at vger.kernel.org
Cc linux-kernel at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-rpi-kernel at lists.infradead.org
Cc arm at kernel.org
---
 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi          |  1 +
 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts       |  4 ++--
 arch/arm64/boot/dts/broadcom/bcm2837.dtsi              |  2 +-
 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi |  1 +
 arch/arm64/boot/dts/broadcom/bcm283x.dtsi              |  1 +
 arch/arm64/boot/dts/skeleton.dtsi                      | 13 +++++++++++++
 6 files changed, 19 insertions(+), 3 deletions(-)
 create mode 120000 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
 create mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
 create mode 120000 arch/arm64/boot/dts/broadcom/bcm283x.dtsi
 create mode 100644 arch/arm64/boot/dts/skeleton.dtsi
arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi new file +1 -0
new file mode 120000
index 0000000..3937b77
@@ -0,0 +1 @@
+../../../../arm/boot/dts/bcm2835-rpi.dtsi
\ No newline at end of file
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts +2 -2
index 6f47dd2..7841b72 100644
@@ -1,7 +1,7 @@
 /dts-v1/;
 #include "bcm2837.dtsi"
-#include "../../../../arm/boot/dts/bcm2835-rpi.dtsi"
-#include "../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
 
 / {
 	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
arch/arm64/boot/dts/broadcom/bcm2837.dtsi +1 -1
index f2a31d0..8216bbb 100644
@@ -1,4 +1,4 @@
-#include "../../../../arm/boot/dts/bcm283x.dtsi"
+#include "bcm283x.dtsi"
 
 / {
 	compatible = "brcm,bcm2836";
arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi new file +1 -0
new file mode 120000
index 0000000..dca7c05
@@ -0,0 +1 @@
+../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
\ No newline at end of file
arch/arm64/boot/dts/broadcom/bcm283x.dtsi new file +1 -0
new file mode 120000
index 0000000..5f54e4c
@@ -0,0 +1 @@
+../../../../arm/boot/dts/bcm283x.dtsi
\ No newline at end of file
arch/arm64/boot/dts/skeleton.dtsi new file +13 -0
new file mode 100644
index 0000000..b41d241
@@ -0,0 +1,13 @@
+/*
+ * Skeleton device tree; the bare minimum needed to boot; just include and
+ * add a compatible value.  The bootloader will typically populate the memory
+ * node.
+ */
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+	chosen { };
+	aliases { };
+	memory { device_type = "memory"; reg = <0 0>; };
+};
Signature · 1 line
2.8.1
#1 lore raw
Quoted 8 lines · Ian Campbell

The ../../../arm... style cross-references added by commit 9d56c22a7861 ("ARM: bcm2835: Add devicetree for the Raspberry Pi 3.") do not work in the context of the split device-tree repository[0] (where the directory structure differs). As with commit 8ee57b8182c4 ("ARM64: dts: vexpress: Use a symlink to vexpress-v2m-rs1.dtsi from arch=arm") use symlinks instead.

These includes in turn require a skeleton.dtsi to be present, so add one as a real file (with the same contents as arch/arm) rather than a symlink.

I don't follow why skeleton.dtsi is needed. The 32-bit RPi dts files are including it? If so, can we just remove it. We decided skeleton.dtsi was a bad idea.

Rob

#2 lore raw
Quoted 7 lines · Rob Herring
Quoted 6 lines · Ian Campbell

The ../../../arm... style cross-references added by commit 9d56c22a7861 ("ARM: bcm2835: Add devicetree for the Raspberry Pi 3.") do not work in the context of the split device-tree repository[0] (where the directory structure differs). As with commit 8ee57b8182c4 ("ARM64: dts: vexpress: Use a symlink to vexpress-v2m-rs1.dtsi from arch=arm") use symlinks instead.

Quoted 6 lines
Quoted 2 lines

These includes in turn require a skeleton.dtsi to be present, so add one as a real file (with the same contents as arch/arm) rather than a symlink.

I don't follow why skeleton.dtsi is needed. The 32-bit RPi dts files are including it? If so, can we just remove it. We decided skeleton.dtsi was a bad idea.

Yup. I don't want to see skeleton.dtsi reappear, and the necessary fixups to source files are relatively simple.

Ian, see commit 3ebee5a2e141496b ("arm64: dts: kill skeleton.dtsi") for the rationale, and hints as to what needs to be fixed up (e.g. if empty memory nodes are required, there should be a comment as to why).

Perhaps this is a good time to attack the remaining 32-bit skeleton.dtsi users. I'll take another look come -rc1.

Thanks,
Mark.

#3 lore raw
Quoted 9 lines · Mark Rutland
Quoted 8 lines · Rob Herring
Quoted 5 lines
Quoted 2 lines · Ian Campbell

These includes in turn require a skeleton.dtsi to be present, so add one as a real file (with the same contents as arch/arm) rather than a symlink.

I don't follow why skeleton.dtsi is needed. The 32-bit RPi dts files are including it?

Exactly.

Quoted 9 lines
Quoted 2 lines

If so, can we just remove it. We decided
skeleton.dtsi was a bad idea.

Yup. I don't want to see skeleton.dtsi reappear, and the necessary fixups to source files are relatively simple.

Ian, see commit 3ebee5a2e141496b ("arm64: dts: kill skeleton.dtsi") for the rationale, and hints as to what needs to be fixed up (e.g. if empty

Quoted 1 line

memory nodes are required, there should be a comment as to why).

Understood.

I can make the mechanical fix to?arch/arm/boot/dts/bcm283x.dtsi (which is linked here as?arch/arm64/boot/dts/broadcom/bcm283x.dtsi which causes the need for skeleton.dtsi) but I don't have any R-Pi hardware with which to verify the need (or not) for empty memory nodes etc.

Quoted 2 lines

Perhaps this is a good time to attack the remaining 32-bit skeleton.dtsi

Quoted 1 line

users. I'll take another look come -rc1.

linux.git$ git grep skeleton.dtsi -- arch/arm??| wc -l 148
linux.git$

Good luck ;-)

Ian.