DeviceTree fixes for 4.14:

- 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
 -----BEGIN PGP SIGNATURE-----
 
 iQItBAABCAAXBQJZyDBuEBxyb2JoQGtlcm5lbC5vcmcACgkQ+vtdtY28YcPmCRAA
 gkNwWbuAwT4VcfOwHYsEaEU77xbM0y1fGbE8dDFp5AtfDV12gJYZlROsEhYvD/aH
 7g47adO/t9tbMW2NA/0d3TAHlTv5TarGJqxkV36FkC2P3hkw56B+0Een7g4KUXm4
 QLPhgaWdcrD6SnHy9BA+X+aNnqI3Ti4IV1QEM6ul4g5E6tGXVMDKzZ3uLMdGh37s
 9UMxy49GoWraga04TAT1ENvlrsY0sH494MoMh+ZJYzYPAJOla3GE8dI1mrsGyjGe
 chWxUBSUa46Lcq/jLM1y3i4S2x4v8fkBTyTIHjklseT5r6T/4KfLl+oXrR6RvuRz
 tBalOtBj85/ihLu/qle0KChugGalF4qytP6WhFrT2911tmjMLHLSB3Y0TAT4d95t
 ZcGmLIezS6duUVL2Is9CauuLvRklQ0osCcMVgh1nmpAWGJ2ROlfBpafSJveqN3+0
 3tyQU8XuRW4VyQbsARgFZ+g1gmbqBMI3nTcdcg2qith3EMRrMo4/mU5kh1EfSXyQ
 hUShqnOLMLYY38KjX7gNKy8J0XAx90oR9chyxoq3fwcqkubLngprZkk00+JPdjVq
 BQwfn10bwxAg+qSMy/5eUPCz0tG94ROJ0PPG4QiSLSvvZH8kSIymCJoq8sGdta3E
 nDwtkyKSgZoqF4VAdy4OhVv1aRqCwlrLQBEc/qBs/Is=
 =6bcc
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2017-09-24 16:04:12 -07:00
commit 6e7f253801
4 changed files with 18 additions and 15 deletions

View File

@ -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>;

View File

@ -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

View File

@ -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,

View File

@ -86,6 +86,7 @@ eod
compile_to_dts() {
dtx="$1"
dtc_include="$2"
if [ -d "${dtx}" ] ; then
@ -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
@ -320,18 +321,13 @@ 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
@ -339,11 +335,11 @@ DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
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