Skip to content

Commit

Permalink
Merge tag 'devicetree-fixes-for-4.14' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
torvalds committed Sep 24, 2017
2 parents a141fd5 + 127b8e2 commit 6e7f253
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Example:
compatible = "st,stm32h743-rcc", "st,stm32-rcc";
reg = <0x58024400 0x400>;
#reset-cells = <1>;
#clock-cells = <2>;
#clock-cells = <1>;
clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s_ckin>;

st,syscfg = <&pwrcfg>;
Expand Down
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/vendor-prefixes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Device tree binding vendor prefix registry. Keep list in alphabetical order.
This isn't an exhaustive list, but you should add new prefixes to it before
using them to avoid name-space collisions.

abcn Abracon Corporation
abilis Abilis Systems
abracon Abracon Corporation
actions Actions Semiconductor Co., Ltd.
active-semi Active-Semi International Inc
ad Avionic Design GmbH
Expand Down
7 changes: 7 additions & 0 deletions include/linux/of_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ extern const struct of_device_id of_default_bus_match_table[];
extern struct platform_device *of_device_alloc(struct device_node *np,
const char *bus_id,
struct device *parent);
#ifdef CONFIG_OF
extern struct platform_device *of_find_device_by_node(struct device_node *np);
#else
static inline struct platform_device *of_find_device_by_node(struct device_node *np)
{
return NULL;
}
#endif

/* Platform devices and busses creation */
extern struct platform_device *of_platform_device_create(struct device_node *np,
Expand Down
22 changes: 9 additions & 13 deletions scripts/dtc/dtx_diff
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ eod
compile_to_dts() {

dtx="$1"
dtc_include="$2"

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

Expand Down Expand Up @@ -113,7 +114,7 @@ compile_to_dts() {
# ----- input is DTS (source)

if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
| ${DTC} -I dts ) ; then
| ${DTC} ${dtc_include} -I dts ) ; then
return
fi

Expand Down Expand Up @@ -320,30 +321,25 @@ fi

cpp_flags="\
-nostdinc \
-I${srctree}/arch/${ARCH}/boot/dts \
-I${srctree}/scripts/dtc/include-prefixes \
-I${srctree}/drivers/of/testcase-data \
-undef -D__DTS__"

dtc_flags="\
-i ${srctree}/arch/${ARCH}/boot/dts/ \
-i ${srctree}/kernel/dts \
${dtx_path_1_dtc_include} \
${dtx_path_2_dtc_include}"

DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
DTC="\
${DTC} \
-i ${srctree}/scripts/dtc/include-prefixes \
-O dts -qq -f ${dtc_sort} -o -"


# ----- do the diff or decompile

if (( ${cmd_diff} )) ; then

diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
<(compile_to_dts "${dtx_file_1}") \
<(compile_to_dts "${dtx_file_2}")
<(compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}") \
<(compile_to_dts "${dtx_file_2}" "${dtx_path_2_dtc_include}")

else

compile_to_dts "${dtx_file_1}"
compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"

fi

0 comments on commit 6e7f253

Please sign in to comment.