Skip to content

Commit 6e7f253

Browse files
committed
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
2 parents a141fd5 + 127b8e2 commit 6e7f253

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Example:
3232
compatible = "st,stm32h743-rcc", "st,stm32-rcc";
3333
reg = <0x58024400 0x400>;
3434
#reset-cells = <1>;
35-
#clock-cells = <2>;
35+
#clock-cells = <1>;
3636
clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s_ckin>;
3737

3838
st,syscfg = <&pwrcfg>;

Documentation/devicetree/bindings/vendor-prefixes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Device tree binding vendor prefix registry. Keep list in alphabetical order.
33
This isn't an exhaustive list, but you should add new prefixes to it before
44
using them to avoid name-space collisions.
55

6-
abcn Abracon Corporation
76
abilis Abilis Systems
7+
abracon Abracon Corporation
88
actions Actions Semiconductor Co., Ltd.
99
active-semi Active-Semi International Inc
1010
ad Avionic Design GmbH

include/linux/of_platform.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,14 @@ extern const struct of_device_id of_default_bus_match_table[];
5757
extern struct platform_device *of_device_alloc(struct device_node *np,
5858
const char *bus_id,
5959
struct device *parent);
60+
#ifdef CONFIG_OF
6061
extern struct platform_device *of_find_device_by_node(struct device_node *np);
62+
#else
63+
static inline struct platform_device *of_find_device_by_node(struct device_node *np)
64+
{
65+
return NULL;
66+
}
67+
#endif
6168

6269
/* Platform devices and busses creation */
6370
extern struct platform_device *of_platform_device_create(struct device_node *np,

scripts/dtc/dtx_diff

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ eod
8686
compile_to_dts() {
8787

8888
dtx="$1"
89+
dtc_include="$2"
8990

9091
if [ -d "${dtx}" ] ; then
9192

@@ -113,7 +114,7 @@ compile_to_dts() {
113114
# ----- input is DTS (source)
114115

115116
if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
116-
| ${DTC} -I dts ) ; then
117+
| ${DTC} ${dtc_include} -I dts ) ; then
117118
return
118119
fi
119120

@@ -320,30 +321,25 @@ fi
320321

321322
cpp_flags="\
322323
-nostdinc \
323-
-I${srctree}/arch/${ARCH}/boot/dts \
324324
-I${srctree}/scripts/dtc/include-prefixes \
325-
-I${srctree}/drivers/of/testcase-data \
326325
-undef -D__DTS__"
327326

328-
dtc_flags="\
329-
-i ${srctree}/arch/${ARCH}/boot/dts/ \
330-
-i ${srctree}/kernel/dts \
331-
${dtx_path_1_dtc_include} \
332-
${dtx_path_2_dtc_include}"
333-
334-
DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
327+
DTC="\
328+
${DTC} \
329+
-i ${srctree}/scripts/dtc/include-prefixes \
330+
-O dts -qq -f ${dtc_sort} -o -"
335331

336332

337333
# ----- do the diff or decompile
338334

339335
if (( ${cmd_diff} )) ; then
340336

341337
diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
342-
<(compile_to_dts "${dtx_file_1}") \
343-
<(compile_to_dts "${dtx_file_2}")
338+
<(compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}") \
339+
<(compile_to_dts "${dtx_file_2}" "${dtx_path_2_dtc_include}")
344340

345341
else
346342

347-
compile_to_dts "${dtx_file_1}"
343+
compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"
348344

349345
fi

0 commit comments

Comments
 (0)