Эх сурвалжийг харах

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
Linus Torvalds 8 жил өмнө
parent
commit
6e7f253801

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

@@ -32,7 +32,7 @@ Example:
 		compatible = "st,stm32h743-rcc", "st,stm32-rcc";
 		compatible = "st,stm32h743-rcc", "st,stm32-rcc";
 		reg = <0x58024400 0x400>;
 		reg = <0x58024400 0x400>;
 		#reset-cells = <1>;
 		#reset-cells = <1>;
-		#clock-cells = <2>;
+		#clock-cells = <1>;
 		clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s_ckin>;
 		clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s_ckin>;
 
 
 		st,syscfg = <&pwrcfg>;
 		st,syscfg = <&pwrcfg>;

+ 1 - 1
Documentation/devicetree/bindings/vendor-prefixes.txt

@@ -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
 This isn't an exhaustive list, but you should add new prefixes to it before
 using them to avoid name-space collisions.
 using them to avoid name-space collisions.
 
 
-abcn	Abracon Corporation
 abilis	Abilis Systems
 abilis	Abilis Systems
+abracon	Abracon Corporation
 actions	Actions Semiconductor Co., Ltd.
 actions	Actions Semiconductor Co., Ltd.
 active-semi	Active-Semi International Inc
 active-semi	Active-Semi International Inc
 ad	Avionic Design GmbH
 ad	Avionic Design GmbH

+ 7 - 0
include/linux/of_platform.h

@@ -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,
 extern struct platform_device *of_device_alloc(struct device_node *np,
 					 const char *bus_id,
 					 const char *bus_id,
 					 struct device *parent);
 					 struct device *parent);
+#ifdef CONFIG_OF
 extern struct platform_device *of_find_device_by_node(struct device_node *np);
 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 */
 /* Platform devices and busses creation */
 extern struct platform_device *of_platform_device_create(struct device_node *np,
 extern struct platform_device *of_platform_device_create(struct device_node *np,

+ 9 - 13
scripts/dtc/dtx_diff

@@ -86,6 +86,7 @@ eod
 compile_to_dts() {
 compile_to_dts() {
 
 
 	dtx="$1"
 	dtx="$1"
+	dtc_include="$2"
 
 
 	if [ -d "${dtx}" ] ; then
 	if [ -d "${dtx}" ] ; then
 
 
@@ -113,7 +114,7 @@ compile_to_dts() {
 		# -----  input is DTS (source)
 		# -----  input is DTS (source)
 
 
 		if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
 		if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
-			| ${DTC} -I dts ) ; then
+			| ${DTC} ${dtc_include} -I dts ) ; then
 			return
 			return
 		fi
 		fi
 
 
@@ -320,18 +321,13 @@ fi
 
 
 cpp_flags="\
 cpp_flags="\
 	-nostdinc                                  \
 	-nostdinc                                  \
-	-I${srctree}/arch/${ARCH}/boot/dts         \
 	-I${srctree}/scripts/dtc/include-prefixes  \
 	-I${srctree}/scripts/dtc/include-prefixes  \
-	-I${srctree}/drivers/of/testcase-data      \
 	-undef -D__DTS__"
 	-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
 # -----  do the diff or decompile
@@ -339,11 +335,11 @@ DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
 if (( ${cmd_diff} )) ; then
 if (( ${cmd_diff} )) ; then
 
 
 	diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
 	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
 else
 
 
-	compile_to_dts "${dtx_file_1}"
+	compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"
 
 
 fi
 fi