Skip to content

Commit d5d332d

Browse files
committed
devicetree: Move include prefixes from arch to separate directory
We use a directory under arch/$ARCH/boot/dts as an include path that has links outside of the subtree to find dt-bindings from under include/dt-bindings. That's been working well, but new DT architectures haven't been adding them by default. Recently there's been a desire to share some of the DT material between arm and arm64, which originally caused developers to create symlinks or relative includes between the subtrees. This isn't ideal -- it breaks if the DT files aren't stored in the exact same hierarchy as the kernel tree, and generally it's just icky. As a somewhat cleaner solution we decided to add a $ARCH/ prefix link once, and allow DTS files to reference dtsi (and dts) files in other architectures that way. Original approach was to create these links under each architecture, but it lead to the problem of recursive symlinks. As a remedy, move the include link directories out of the architecture trees into a common location. At the same time, they can now share one directory and one dt-bindings/ link as well. Fixes: 4027494 ('ARM: dts: add arm/arm64 include symlinks') Reported-by: Russell King <[email protected]> Reported-by: Omar Sandoval <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Reviewed-by: Masahiro Yamada <[email protected]> Tested-by: Heiko Stuebner <[email protected]> Acked-by: Rob Herring <[email protected]> Cc: Heiko Stuebner <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Russell King <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Jesper Nilsson <[email protected]> Cc: James Hogan <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Frank Rowand <[email protected]> Cc: linux-arch <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
1 parent 5252d73 commit d5d332d

File tree

26 files changed

+16
-11
lines changed

26 files changed

+16
-11
lines changed

arch/arm/boot/dts/include/arm

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/arm/boot/dts/include/arm64

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/arm/boot/dts/include/dt-bindings

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/arm64/boot/dts/include/arm

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/arm64/boot/dts/include/arm64

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/arm64/boot/dts/include/dt-bindings

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/cris/boot/dts/include/dt-bindings

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/metag/boot/dts/include/dt-bindings

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/mips/boot/dts/include/dt-bindings

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/powerpc/boot/dts/include/dt-bindings

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/Makefile.lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ ld_flags = $(LDFLAGS) $(ldflags-y)
175175

176176
dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
177177
-I$(srctree)/arch/$(SRCARCH)/boot/dts \
178-
-I$(srctree)/arch/$(SRCARCH)/boot/dts/include \
178+
-I$(srctree)/scripts/dtc/include-prefixes \
179179
-I$(srctree)/drivers/of/testcase-data \
180180
-undef -D__DTS__
181181

scripts/dtc/include-prefixes/arc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/arc/boot/dts

scripts/dtc/include-prefixes/arm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/arm/boot/dts

scripts/dtc/include-prefixes/arm64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/arm64/boot/dts

scripts/dtc/include-prefixes/c6x

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/c6x/boot/dts

scripts/dtc/include-prefixes/cris

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/cris/boot/dts
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../include/dt-bindings

scripts/dtc/include-prefixes/h8300

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/h8300/boot/dts

scripts/dtc/include-prefixes/metag

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/metag/boot/dts
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/microblaze/boot/dts

scripts/dtc/include-prefixes/mips

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/mips/boot/dts

scripts/dtc/include-prefixes/nios2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/nios2/boot/dts

scripts/dtc/include-prefixes/openrisc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/openrisc/boot/dts

scripts/dtc/include-prefixes/powerpc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/powerpc/boot/dts

scripts/dtc/include-prefixes/sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/sh/boot/dts

scripts/dtc/include-prefixes/xtensa

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../arch/xtensa/boot/dts

0 commit comments

Comments
 (0)