aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-24 19:04:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-24 19:04:12 -0400
commit6e7f253801a2c7e6274b702e5cbda78b89122470 (patch)
treefc1649add5c2cab2acc73856a95c0518da6b6c47
parenta141fd55f26231b5a17f74e504c56d44c3e62e5d (diff)
parent127b8e2692b6c145955bb71e482ca1bc6ce10027 (diff)
Merge tag 'devicetree-fixes-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree fixes from Rob Herring: - fix build for !OF providing empty of_find_device_by_node - fix Abracon vendor prefix - sync dtx_diff include paths (again) - a stm32h7 clock binding doc fix * tag 'devicetree-fixes-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: clk: stm32h7: fix clock-cell size scripts/dtc: dtx_diff - 2nd update of include dts paths to match build dt-bindings: fix vendor prefix for Abracon of: provide inline helper for of_find_device_by_node
-rw-r--r--Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt2
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt2
-rw-r--r--include/linux/of_platform.h7
-rwxr-xr-xscripts/dtc/dtx_diff22
4 files changed, 18 insertions, 15 deletions
diff --git a/Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt
index a135504c7d57..cac24ee10b72 100644
--- a/Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt
+++ b/Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt
@@ -32,7 +32,7 @@ Example:
32 compatible = "st,stm32h743-rcc", "st,stm32-rcc"; 32 compatible = "st,stm32h743-rcc", "st,stm32-rcc";
33 reg = <0x58024400 0x400>; 33 reg = <0x58024400 0x400>;
34 #reset-cells = <1>; 34 #reset-cells = <1>;
35 #clock-cells = <2>; 35 #clock-cells = <1>;
36 clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s_ckin>; 36 clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s_ckin>;
37 37
38 st,syscfg = <&pwrcfg>; 38 st,syscfg = <&pwrcfg>;
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 1ea1fd4232ab..1afd298eddd7 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -3,8 +3,8 @@ Device tree binding vendor prefix registry. Keep list in alphabetical order.
3This isn't an exhaustive list, but you should add new prefixes to it before 3This isn't an exhaustive list, but you should add new prefixes to it before
4using them to avoid name-space collisions. 4using them to avoid name-space collisions.
5 5
6abcn Abracon Corporation
7abilis Abilis Systems 6abilis Abilis Systems
7abracon Abracon Corporation
8actions Actions Semiconductor Co., Ltd. 8actions Actions Semiconductor Co., Ltd.
9active-semi Active-Semi International Inc 9active-semi Active-Semi International Inc
10ad Avionic Design GmbH 10ad Avionic Design GmbH
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index e0d1946270f3..fb908e598348 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -57,7 +57,14 @@ extern const struct of_device_id of_default_bus_match_table[];
57extern struct platform_device *of_device_alloc(struct device_node *np, 57extern struct platform_device *of_device_alloc(struct device_node *np,
58 const char *bus_id, 58 const char *bus_id,
59 struct device *parent); 59 struct device *parent);
60#ifdef CONFIG_OF
60extern struct platform_device *of_find_device_by_node(struct device_node *np); 61extern struct platform_device *of_find_device_by_node(struct device_node *np);
62#else
63static inline struct platform_device *of_find_device_by_node(struct device_node *np)
64{
65 return NULL;
66}
67#endif
61 68
62/* Platform devices and busses creation */ 69/* Platform devices and busses creation */
63extern struct platform_device *of_platform_device_create(struct device_node *np, 70extern struct platform_device *of_platform_device_create(struct device_node *np,
diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
index f9a3d8d23c64..8c4fbad2055e 100755
--- a/scripts/dtc/dtx_diff
+++ b/scripts/dtc/dtx_diff
@@ -86,6 +86,7 @@ eod
86compile_to_dts() { 86compile_to_dts() {
87 87
88 dtx="$1" 88 dtx="$1"
89 dtc_include="$2"
89 90
90 if [ -d "${dtx}" ] ; then 91 if [ -d "${dtx}" ] ; then
91 92
@@ -113,7 +114,7 @@ compile_to_dts() {
113 # ----- input is DTS (source) 114 # ----- input is DTS (source)
114 115
115 if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \ 116 if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
116 | ${DTC} -I dts ) ; then 117 | ${DTC} ${dtc_include} -I dts ) ; then
117 return 118 return
118 fi 119 fi
119 120
@@ -320,18 +321,13 @@ fi
320 321
321cpp_flags="\ 322cpp_flags="\
322 -nostdinc \ 323 -nostdinc \
323 -I${srctree}/arch/${ARCH}/boot/dts \
324 -I${srctree}/scripts/dtc/include-prefixes \ 324 -I${srctree}/scripts/dtc/include-prefixes \
325 -I${srctree}/drivers/of/testcase-data \
326 -undef -D__DTS__" 325 -undef -D__DTS__"
327 326
328dtc_flags="\ 327DTC="\
329 -i ${srctree}/arch/${ARCH}/boot/dts/ \ 328 ${DTC} \
330 -i ${srctree}/kernel/dts \ 329 -i ${srctree}/scripts/dtc/include-prefixes \
331 ${dtx_path_1_dtc_include} \ 330 -O dts -qq -f ${dtc_sort} -o -"
332 ${dtx_path_2_dtc_include}"
333
334DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
335 331
336 332
337# ----- do the diff or decompile 333# ----- do the diff or decompile
@@ -339,11 +335,11 @@ DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
339if (( ${cmd_diff} )) ; then 335if (( ${cmd_diff} )) ; then
340 336
341 diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \ 337 diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
342 <(compile_to_dts "${dtx_file_1}") \ 338 <(compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}") \
343 <(compile_to_dts "${dtx_file_2}") 339 <(compile_to_dts "${dtx_file_2}" "${dtx_path_2_dtc_include}")
344 340
345else 341else
346 342
347 compile_to_dts "${dtx_file_1}" 343 compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"
348 344
349fi 345fi