Skip to contentSkip to conversation

arc: Add "include chroot" for DT bindings

PATCH In review Alexey Brodkin 3 participants 4 messages May 30, 2017

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

PATCH 1/1 arc: Add "include chroot" for DT bindings

Basically this extends
c58299aa8754 "kbuild: create an "include chroot" for DT bindings" for ARC where we extensively use Device Tree and there're good reasons to use DT bindings, especially if those are required.

Otherwise on attempt to compile .dts with something like:
-------------------->8---------------------
#include <dt-bindings/net/ti-dp83867.h>
-------------------->8---------------------

we inevitably see this compilation failure:
-------------------->8---------------------
arch/arc/boot/dts/hsdk.dts:16:40: fatal error: dt-bindings/net/ti-dp83867.h: No such file or directory

 #include <dt-bindings/net/ti-dp83867.h>
                                        ^

compilation terminated.
-------------------->8---------------------

Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>
Cc Stephen Warren <swarren at wwwdotorg.org>
Cc Rob Herring <robh+dt at kernel.org>
---
 arch/arc/boot/dts/include/dt-bindings | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 arch/arc/boot/dts/include/dt-bindings
arch/arc/boot/dts/include/dt-bindings new file +1 -0
new file mode 120000
index 000000000000..08c00e4972fa
@@ -0,0 +1 @@
+../../../../../include/dt-bindings
\ No newline at end of file
Signature · 1 line
2.7.4
#1 lore raw
Quoted 32 lines · Alexey Brodkin

Basically this extends
c58299aa8754 "kbuild: create an "include chroot" for DT bindings" for ARC where we extensively use Device Tree and there're good reasons to use DT bindings, especially if those are required.

Otherwise on attempt to compile .dts with something like:
-------------------->8---------------------
#include <dt-bindings/net/ti-dp83867.h>
-------------------->8---------------------

we inevitably see this compilation failure:
-------------------->8---------------------
arch/arc/boot/dts/hsdk.dts:16:40: fatal error: dt-bindings/net/ti-dp83867.h: No such file or directory

  #include <dt-bindings/net/ti-dp83867.h>
                                         ^

compilation terminated.
-------------------->8---------------------

Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>
Cc Stephen Warren <swarren at wwwdotorg.org>
Cc Rob Herring <robh+dt at kernel.org>
---
  arch/arc/boot/dts/include/dt-bindings | 1 +
  1 file changed, 1 insertion(+)

create mode 120000 arch/arc/boot/dts/include/dt-bindings

arch/arc/boot/dts/include/dt-bindings new file +0 -0
new file mode 120000
index 000000000000..08c00e4972fa

arch/arc/boot/dts/include/dt-bindings line 1

Quoted 2 lines
arch/arc/boot/dts/include/dt-bindings new file +1 -0
@@ -0,0 +1 @@
+../../../../../include/dt-bindings
\ No newline at end of file

I'm OK with adding this to ARC, but won't it be nicer to have a generic include helper instead to avoid boilerplate addition in multiple places ?

-Vineet

#2 lore raw
In reply to Alexey Brodkin
Quoted 18 lines · Alexey Brodkin

Basically this extends
c58299aa8754 "kbuild: create an "include chroot" for DT bindings" for ARC where we extensively use Device Tree and there're good reasons to use DT bindings, especially if those are required.

Otherwise on attempt to compile .dts with something like:
-------------------->8---------------------
#include <dt-bindings/net/ti-dp83867.h>
-------------------->8---------------------

we inevitably see this compilation failure:
-------------------->8---------------------
arch/arc/boot/dts/hsdk.dts:16:40: fatal error: dt-bindings/net/ti-dp83867.h: No such file or directory

 #include <dt-bindings/net/ti-dp83867.h>
                                        ^

compilation terminated.
-------------------->8---------------------

Quoted 7 lines
Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>
Cc Stephen Warren <swarren at wwwdotorg.org>
Cc Rob Herring <robh+dt at kernel.org>
---
 arch/arc/boot/dts/include/dt-bindings | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 arch/arc/boot/dts/include/dt-bindings

I believe commit d5d332d3f7e8 ("devicetree: Move include prefixes from arch to separate directory") does what you want.

Rob

#3 lore raw

Hi Rob,

Quoted 29 lines · Rob Herring
Quoted 19 lines · Alexey Brodkin

Basically this extends
c58299aa8754 "kbuild: create an "include chroot" for DT bindings" for ARC where we extensively use Device Tree and there're good reasons to use DT bindings, especially if those are required.

Otherwise on attempt to compile .dts with something like:
-------------------->8--------------------- ?#include <dt-bindings/net/ti-dp83867.h> -------------------->8---------------------

we inevitably see this compilation failure:
-------------------->8---------------------
arch/arc/boot/dts/hsdk.dts:16:40: fatal error: dt-bindings/net/ti-dp83867.h: No such file or directory ?#include <dt-bindings/net/ti-dp83867.h>
????????????????????????????????????????^
compilation terminated.
-------------------->8---------------------

Quoted 7 lines
Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>
Cc Stephen Warren <swarren at wwwdotorg.org>
Cc Rob Herring <robh+dt at kernel.org>

---
?arch/arc/boot/dts/include/dt-bindings | 1 +
?1 file changed, 1 insertion(+)
?create mode 120000 arch/arc/boot/dts/include/dt-bindings

Quoted 2 lines

I believe commit d5d332d3f7e8 ("devicetree: Move include prefixes from arch to separate directory") does what you want.

Indeed that helps!
Thanks a lot for the pointer!

-Alexey