# SPDX-License-Identifier: GPL-2.0
-obj-y += testcases.dtb.o
+obj-y += testcases.dtbo.o
-obj-$(CONFIG_OF_OVERLAY) += overlay.dtb.o \
- overlay_0.dtb.o \
- overlay_1.dtb.o \
- overlay_2.dtb.o \
- overlay_3.dtb.o \
- overlay_4.dtb.o \
- overlay_5.dtb.o \
- overlay_6.dtb.o \
- overlay_7.dtb.o \
- overlay_8.dtb.o \
- overlay_9.dtb.o \
- overlay_10.dtb.o \
- overlay_11.dtb.o \
- overlay_12.dtb.o \
- overlay_13.dtb.o \
- overlay_15.dtb.o \
- overlay_16.dtb.o \
- overlay_17.dtb.o \
- overlay_18.dtb.o \
- overlay_19.dtb.o \
- overlay_20.dtb.o \
- overlay_bad_add_dup_node.dtb.o \
- overlay_bad_add_dup_prop.dtb.o \
- overlay_bad_phandle.dtb.o \
- overlay_bad_symbol.dtb.o \
- overlay_base.dtb.o \
- overlay_gpio_01.dtb.o \
- overlay_gpio_02a.dtb.o \
- overlay_gpio_02b.dtb.o \
- overlay_gpio_03.dtb.o \
- overlay_gpio_04a.dtb.o \
- overlay_gpio_04b.dtb.o
+obj-$(CONFIG_OF_OVERLAY) += overlay.dtbo.o \
+ overlay_0.dtbo.o \
+ overlay_1.dtbo.o \
+ overlay_2.dtbo.o \
+ overlay_3.dtbo.o \
+ overlay_4.dtbo.o \
+ overlay_5.dtbo.o \
+ overlay_6.dtbo.o \
+ overlay_7.dtbo.o \
+ overlay_8.dtbo.o \
+ overlay_9.dtbo.o \
+ overlay_10.dtbo.o \
+ overlay_11.dtbo.o \
+ overlay_12.dtbo.o \
+ overlay_13.dtbo.o \
+ overlay_15.dtbo.o \
+ overlay_16.dtbo.o \
+ overlay_17.dtbo.o \
+ overlay_18.dtbo.o \
+ overlay_19.dtbo.o \
+ overlay_20.dtbo.o \
+ overlay_bad_add_dup_node.dtbo.o \
+ overlay_bad_add_dup_prop.dtbo.o \
+ overlay_bad_phandle.dtbo.o \
+ overlay_bad_symbol.dtbo.o \
+ overlay_base.dtbo.o \
+ overlay_gpio_01.dtbo.o \
+ overlay_gpio_02a.dtbo.o \
+ overlay_gpio_02b.dtbo.o \
+ overlay_gpio_03.dtbo.o \
+ overlay_gpio_04a.dtbo.o \
+ overlay_gpio_04b.dtbo.o
# enable creation of __symbols__ node
DTC_FLAGS_overlay += -@
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-&electric_1 {
-
- status = "okay";
-
- hvac_2: hvac-large-1 {
- compatible = "ot,hvac-large";
- heat-range = < 40 75 >;
- cool-range = < 65 80 >;
- };
-};
-
-&rides_1 {
-
- #address-cells = <1>;
- #size-cells = <1>;
- status = "okay";
-
- ride@100 {
- #address-cells = <1>;
- #size-cells = <1>;
-
- track@30 {
- incline-up = < 48 32 16 >;
- };
-
- track@40 {
- incline-up = < 47 31 15 >;
- };
- };
-
- ride_200: ride@200 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "ot,ferris-wheel";
- reg = < 0x00000200 0x100 >;
- hvac-provider = < &hvac_2 >;
- hvac-thermostat = < 27 32 > ;
- hvac-zones = < 12 5 >;
- hvac-zone-names = "operator", "snack-bar";
- spin-controller = < &spin_ctrl_1 3 >;
- spin-rph = < 30 >;
- gondolas = < 16 >;
- gondola-capacity = < 6 >;
-
- ride_200_left: track@10 {
- reg = < 0x00000010 0x10 >;
- };
-
- ride_200_right: track@20 {
- reg = < 0x00000020 0x10 >;
- };
- };
-};
-
-&lights_2 {
-
- status = "okay";
- color = "purple", "white", "red", "green";
- rate = < 3 256 >;
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+&electric_1 {
+
+ status = "okay";
+
+ hvac_2: hvac-large-1 {
+ compatible = "ot,hvac-large";
+ heat-range = < 40 75 >;
+ cool-range = < 65 80 >;
+ };
+};
+
+&rides_1 {
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ status = "okay";
+
+ ride@100 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ track@30 {
+ incline-up = < 48 32 16 >;
+ };
+
+ track@40 {
+ incline-up = < 47 31 15 >;
+ };
+ };
+
+ ride_200: ride@200 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ot,ferris-wheel";
+ reg = < 0x00000200 0x100 >;
+ hvac-provider = < &hvac_2 >;
+ hvac-thermostat = < 27 32 > ;
+ hvac-zones = < 12 5 >;
+ hvac-zone-names = "operator", "snack-bar";
+ spin-controller = < &spin_ctrl_1 3 >;
+ spin-rph = < 30 >;
+ gondolas = < 16 >;
+ gondola-capacity = < 6 >;
+
+ ride_200_left: track@10 {
+ reg = < 0x00000010 0x10 >;
+ };
+
+ ride_200_right: track@20 {
+ reg = < 0x00000020 0x10 >;
+ };
+ };
+};
+
+&lights_2 {
+
+ status = "okay";
+ color = "purple", "white", "red", "green";
+ rate = < 3 256 >;
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/ {
- /* overlay_0 - enable using absolute target path */
-
- fragment@0 {
- target-path = "/testcase-data/overlay-node/test-bus/test-unittest0";
- __overlay__ {
- status = "okay";
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/ {
+ /* overlay_0 - enable using absolute target path */
+
+ fragment@0 {
+ target-path = "/testcase-data/overlay-node/test-bus/test-unittest0";
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/ {
- /* overlay_1 - disable using absolute target path */
-
- fragment@0 {
- target-path = "/testcase-data/overlay-node/test-bus/test-unittest1";
- __overlay__ {
- status = "disabled";
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/ {
+ /* overlay_1 - disable using absolute target path */
+
+ fragment@0 {
+ target-path = "/testcase-data/overlay-node/test-bus/test-unittest1";
+ __overlay__ {
+ status = "disabled";
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_10 */
-/* overlays 8, 9, 10, 11 application and removal in bad sequence */
-
-&unittest_test_bus {
- /* suppress DTC warning */
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest10 {
- compatible = "unittest";
- status = "okay";
- reg = <10>;
-
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest101 {
- compatible = "unittest";
- status = "okay";
- reg = <1>;
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_10 */
+/* overlays 8, 9, 10, 11 application and removal in bad sequence */
+
+&unittest_test_bus {
+ /* suppress DTC warning */
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest10 {
+ compatible = "unittest";
+ status = "okay";
+ reg = <10>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest101 {
+ compatible = "unittest";
+ status = "okay";
+ reg = <1>;
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_11 */
-/* overlays 8, 9, 10, 11 application and removal in bad sequence */
-
-&unittest_test_bus {
- /* suppress DTC warning */
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest11 {
- compatible = "unittest";
- status = "okay";
- reg = <11>;
-
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest111 {
- compatible = "unittest";
- status = "okay";
- reg = <1>;
- };
-
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_11 */
+/* overlays 8, 9, 10, 11 application and removal in bad sequence */
+
+&unittest_test_bus {
+ /* suppress DTC warning */
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest11 {
+ compatible = "unittest";
+ status = "okay";
+ reg = <11>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest111 {
+ compatible = "unittest";
+ status = "okay";
+ reg = <1>;
+ };
+
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/ {
- /* overlay_12 - enable using absolute target path (i2c) */
-
- fragment@0 {
- target-path = "/testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest12";
- __overlay__ {
- status = "okay";
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/ {
+ /* overlay_12 - enable using absolute target path (i2c) */
+
+ fragment@0 {
+ target-path = "/testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest12";
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/ {
- /* overlay_13 - disable using absolute target path (i2c) */
-
- fragment@0 {
- target-path = "/testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest13";
- __overlay__ {
- status = "disabled";
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/ {
+ /* overlay_13 - disable using absolute target path (i2c) */
+
+ fragment@0 {
+ target-path = "/testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest13";
+ __overlay__ {
+ status = "disabled";
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_15 - mux overlay */
-
-&unittest_i2c_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
- test-unittest15 {
- reg = <11>;
- compatible = "unittest-i2c-mux";
- status = "okay";
-
- #address-cells = <1>;
- #size-cells = <0>;
-
- i2c@0 {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0>;
-
- test-mux-dev@20 {
- reg = <0x20>;
- compatible = "unittest-i2c-dev";
- status = "okay";
- };
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_15 - mux overlay */
+
+&unittest_i2c_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ test-unittest15 {
+ reg = <11>;
+ compatible = "unittest-i2c-mux";
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+
+ test-mux-dev@20 {
+ reg = <0x20>;
+ compatible = "unittest-i2c-dev";
+ status = "okay";
+ };
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_16 - notify test */
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest16 {
- compatible = "unittest";
- reg = <16>;
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_16 - notify test */
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest16 {
+ compatible = "unittest";
+ reg = <16>;
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_17 - notify test */
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest17 {
- compatible = "unittest";
- reg = <17>;
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_17 - notify test */
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest17 {
+ compatible = "unittest";
+ reg = <17>;
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_18 - notify test */
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest18 {
- compatible = "unittest";
- reg = <18>;
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_18 - notify test */
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest18 {
+ compatible = "unittest";
+ reg = <18>;
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_19 - notify test */
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest19 {
- compatible = "unittest";
- reg = <19>;
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_19 - notify test */
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest19 {
+ compatible = "unittest";
+ reg = <19>;
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_2 - enable using label */
-
-&unittest2 {
- status = "okay";
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_2 - enable using label */
+
+&unittest2 {
+ status = "okay";
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_20 - notify test */
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest20 {
- compatible = "unittest";
- reg = <20>;
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_20 - notify test */
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest20 {
+ compatible = "unittest";
+ reg = <20>;
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_3 - disable using label */
-
-&unittest3 {
- status = "disabled";
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_3 - disable using label */
+
+&unittest3 {
+ status = "disabled";
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_4 - test insertion of a full node */
-
-&unittest_test_bus {
-
- /* suppress DTC warning */
- #address-cells = <1>;
- #size-cells = <0>;
-
- test-unittest4 {
- compatible = "unittest";
- status = "okay";
- reg = <4>;
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_4 - test insertion of a full node */
+
+&unittest_test_bus {
+
+ /* suppress DTC warning */
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ test-unittest4 {
+ compatible = "unittest";
+ status = "okay";
+ reg = <4>;
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_5 - test overlay apply revert */
-
-&unittest5 {
- status = "okay";
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_5 - test overlay apply revert */
+
+&unittest5 {
+ status = "okay";
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_6 */
-/* overlays 6, 7 application and removal in sequence */
-
-&unittest6 {
- status = "okay";
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_6 */
+/* overlays 6, 7 application and removal in sequence */
+
+&unittest6 {
+ status = "okay";
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_7 */
-/* overlays 6, 7 application and removal in sequence */
-
-&unittest7 {
- status = "okay";
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_7 */
+/* overlays 6, 7 application and removal in sequence */
+
+&unittest7 {
+ status = "okay";
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_8 */
-/* overlays 8, 9, 10, 11 application and removal in bad sequence */
-
-&unittest8 {
- status = "okay";
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_8 */
+/* overlays 8, 9, 10, 11 application and removal in bad sequence */
+
+&unittest8 {
+ status = "okay";
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/* overlay_9 */
-/* overlays 8, 9, 10, 11 application and removal in bad sequence */
-
-&unittest8 {
- property-foo = "bar";
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/* overlay_9 */
+/* overlays 8, 9, 10, 11 application and removal in bad sequence */
+
+&unittest8 {
+ property-foo = "bar";
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/*
- * &electric_1/motor-1 and &spin_ctrl_1 are the same node:
- * /testcase-data-2/substation@100/motor-1
- *
- * Thus the new node "controller" in each fragment will
- * result in an attempt to add the same node twice.
- * This will result in an error and the overlay apply
- * will fail.
- */
-
-&electric_1 {
-
- motor-1 {
- controller {
- power_bus = < 0x1 0x2 >;
- };
- };
-};
-
-&spin_ctrl_1 {
- controller {
- power_bus_emergency = < 0x101 0x102 >;
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/*
+ * &electric_1/motor-1 and &spin_ctrl_1 are the same node:
+ * /testcase-data-2/substation@100/motor-1
+ *
+ * Thus the new node "controller" in each fragment will
+ * result in an attempt to add the same node twice.
+ * This will result in an error and the overlay apply
+ * will fail.
+ */
+
+&electric_1 {
+
+ motor-1 {
+ controller {
+ power_bus = < 0x1 0x2 >;
+ };
+ };
+};
+
+&spin_ctrl_1 {
+ controller {
+ power_bus_emergency = < 0x101 0x102 >;
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/*
- * &electric_1/motor-1/electric and &spin_ctrl_1/electric are the same node:
- * /testcase-data-2/substation@100/motor-1/electric
- *
- * Thus the property "rpm_avail" in each fragment will
- * result in an attempt to update the same property twice.
- * This will result in an error and the overlay apply
- * will fail.
- *
- * The previous version of this test did not include the extra
- * level of node 'electric'. That resulted in the 'rpm_avail'
- * property being located in the pre-existing node 'motor-1'.
- * Modifying a property results in a WARNING that a memory leak
- * will occur if the overlay is removed. Since the overlay apply
- * fails, the memory leak does actually occur, and kmemleak will
- * further report the memory leak if CONFIG_DEBUG_KMEMLEAK is
- * enabled. Adding the overlay node 'electric' avoids the
- * memory leak and thus people who use kmemleak will not
- * have to debug this non-problem again.
- */
-
-&electric_1 {
-
- motor-1 {
- electric {
- rpm_avail = < 100 >;
- };
- };
-};
-
-&spin_ctrl_1 {
- electric {
- rpm_avail = < 100 200 >;
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+/*
+ * &electric_1/motor-1/electric and &spin_ctrl_1/electric are the same node:
+ * /testcase-data-2/substation@100/motor-1/electric
+ *
+ * Thus the property "rpm_avail" in each fragment will
+ * result in an attempt to update the same property twice.
+ * This will result in an error and the overlay apply
+ * will fail.
+ *
+ * The previous version of this test did not include the extra
+ * level of node 'electric'. That resulted in the 'rpm_avail'
+ * property being located in the pre-existing node 'motor-1'.
+ * Modifying a property results in a WARNING that a memory leak
+ * will occur if the overlay is removed. Since the overlay apply
+ * fails, the memory leak does actually occur, and kmemleak will
+ * further report the memory leak if CONFIG_DEBUG_KMEMLEAK is
+ * enabled. Adding the overlay node 'electric' avoids the
+ * memory leak and thus people who use kmemleak will not
+ * have to debug this non-problem again.
+ */
+
+&electric_1 {
+
+ motor-1 {
+ electric {
+ rpm_avail = < 100 >;
+ };
+ };
+};
+
+&spin_ctrl_1 {
+ electric {
+ rpm_avail = < 100 200 >;
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-&electric_1 {
-
- // This label should cause an error when the overlay
- // is applied. There is already a phandle value
- // in the base tree for motor-1.
- spin_ctrl_1_conflict: motor-1 {
- accelerate = < 3 >;
- decelerate = < 5 >;
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+&electric_1 {
+
+ // This label should cause an error when the overlay
+ // is applied. There is already a phandle value
+ // in the base tree for motor-1.
+ spin_ctrl_1_conflict: motor-1 {
+ accelerate = < 3 >;
+ decelerate = < 5 >;
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-&electric_1 {
-
- // This label should cause an error when the overlay
- // is applied. There is already a symbol hvac_1
- // in the base tree
- hvac_1: hvac-medium-2 {
- compatible = "ot,hvac-medium";
- heat-range = < 50 75 >;
- cool-range = < 60 80 >;
- };
-
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+&electric_1 {
+
+ // This label should cause an error when the overlay
+ // is applied. There is already a symbol hvac_1
+ // in the base tree
+ hvac_1: hvac-medium-2 {
+ compatible = "ot,hvac-medium";
+ heat-range = < 50 75 >;
+ cool-range = < 60 80 >;
+ };
+
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-#include "overlay_common.dtsi"
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+#include "overlay_common.dtsi"
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
- gpio@0 {
- compatible = "unittest-gpio";
- reg = <0>;
- gpio-controller;
- #gpio-cells = <2>;
- ngpios = <2>;
- gpio-line-names = "line-A", "line-B";
-
- line-b {
- gpio-hog;
- gpios = <2 0>;
- input;
- line-name = "line-B-input";
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio@0 {
+ compatible = "unittest-gpio";
+ reg = <0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <2>;
+ gpio-line-names = "line-A", "line-B";
+
+ line-b {
+ gpio-hog;
+ gpios = <2 0>;
+ input;
+ line-name = "line-B-input";
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
- gpio@2 {
- compatible = "unittest-gpio";
- reg = <2>;
- gpio-controller;
- #gpio-cells = <2>;
- ngpios = <2>;
- gpio-line-names = "line-A", "line-B";
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio@2 {
+ compatible = "unittest-gpio";
+ reg = <2>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <2>;
+ gpio-line-names = "line-A", "line-B";
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
- gpio@2 {
- line-a {
- gpio-hog;
- gpios = <1 0>;
- input;
- line-name = "line-A-input";
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio@2 {
+ line-a {
+ gpio-hog;
+ gpios = <1 0>;
+ input;
+ line-name = "line-A-input";
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
- gpio@3 {
- compatible = "unittest-gpio";
- reg = <3>;
- gpio-controller;
- #gpio-cells = <2>;
- ngpios = <2>;
- gpio-line-names = "line-A", "line-B", "line-C", "line-D";
-
- line-d {
- gpio-hog;
- gpios = <4 0>;
- input;
- line-name = "line-D-input";
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio@3 {
+ compatible = "unittest-gpio";
+ reg = <3>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <2>;
+ gpio-line-names = "line-A", "line-B", "line-C", "line-D";
+
+ line-d {
+ gpio-hog;
+ gpios = <4 0>;
+ input;
+ line-name = "line-D-input";
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
- gpio@4 {
- compatible = "unittest-gpio";
- reg = <4>;
- gpio-controller;
- #gpio-cells = <2>;
- ngpios = <2>;
- gpio-line-names = "line-A", "line-B", "line-C", "line-D";
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio@4 {
+ compatible = "unittest-gpio";
+ reg = <4>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <2>;
+ gpio-line-names = "line-A", "line-B", "line-C", "line-D";
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-&unittest_test_bus {
- #address-cells = <1>;
- #size-cells = <0>;
- gpio@4 {
- line-c {
- gpio-hog;
- gpios = <3 0>;
- input;
- line-name = "line-C-input";
- };
- };
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+&unittest_test_bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio@4 {
+ line-c {
+ gpio-hog;
+ gpios = <3 0>;
+ input;
+ line-name = "line-C-input";
+ };
+ };
+};
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-#include "testcases_common.dtsi"
-
-/ {
- /*
- * testcase data that intentionally results in an error is located here
- * instead of in testcases_common.dtsi so that the static overlay apply
- * tests will not include the error.
- */
- testcase-data {
- testcase-device2 {
- compatible = "testcase-device";
- interrupt-parent = <&test_intc2>;
- interrupts = <1>; /* invalid specifier - too short */
- };
- };
-
-};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+/plugin/;
+
+#include "testcases_common.dtsi"
+
+/ {
+ /*
+ * testcase data that intentionally results in an error is located here
+ * instead of in testcases_common.dtsi so that the static overlay apply
+ * tests will not include the error.
+ */
+ testcase-data {
+ testcase-device2 {
+ compatible = "testcase-device";
+ interrupt-parent = <&test_intc2>;
+ interrupts = <1>; /* invalid specifier - too short */
+ };
+ };
+
+};
void *unittest_data_align;
struct device_node *unittest_data_node = NULL, *np;
/*
- * __dtb_testcases_begin[] and __dtb_testcases_end[] are magically
- * created by cmd_dt_S_dtb in scripts/Makefile.lib
+ * __dtbo_testcases_begin[] and __dtbo_testcases_end[] are magically
+ * created by cmd_dt_S_dtbo in scripts/Makefile.lib
*/
- extern uint8_t __dtb_testcases_begin[];
- extern uint8_t __dtb_testcases_end[];
- const int size = __dtb_testcases_end - __dtb_testcases_begin;
+ extern uint8_t __dtbo_testcases_begin[];
+ extern uint8_t __dtbo_testcases_end[];
+ const int size = __dtbo_testcases_end - __dtbo_testcases_begin;
int rc;
void *ret;
return -ENOMEM;
unittest_data_align = PTR_ALIGN(unittest_data, FDT_ALIGN_SIZE);
- memcpy(unittest_data_align, __dtb_testcases_begin, size);
+ memcpy(unittest_data_align, __dtbo_testcases_begin, size);
ret = of_fdt_unflatten_tree(unittest_data_align, NULL, &unittest_data_node);
if (!ret) {
#ifdef CONFIG_OF_OVERLAY
/*
- * __dtb_ot_begin[] and __dtb_ot_end[] are created by cmd_dt_S_dtb
- * in scripts/Makefile.lib
+ * __dtbo_##overlay_name##_begin[] and __dtbo_##overlay_name##_end[] are
+ * created by cmd_dt_S_dtbo in scripts/Makefile.lib
*/
-#define OVERLAY_INFO_EXTERN(name) \
- extern uint8_t __dtb_##name##_begin[]; \
- extern uint8_t __dtb_##name##_end[]
+#define OVERLAY_INFO_EXTERN(overlay_name) \
+ extern uint8_t __dtbo_##overlay_name##_begin[]; \
+ extern uint8_t __dtbo_##overlay_name##_end[]
-#define OVERLAY_INFO(overlay_name, expected) \
-{ .dtb_begin = __dtb_##overlay_name##_begin, \
- .dtb_end = __dtb_##overlay_name##_end, \
- .expected_result = expected, \
- .name = #overlay_name, \
+#define OVERLAY_INFO(overlay_name, expected) \
+{ .dtbo_begin = __dtbo_##overlay_name##_begin, \
+ .dtbo_end = __dtbo_##overlay_name##_end, \
+ .expected_result = expected, \
+ .name = #overlay_name, \
}
struct overlay_info {
- uint8_t *dtb_begin;
- uint8_t *dtb_end;
+ uint8_t *dtbo_begin;
+ uint8_t *dtbo_end;
int expected_result;
int ovcs_id;
char *name;
OVERLAY_INFO(overlay_bad_phandle, -EINVAL),
OVERLAY_INFO(overlay_bad_symbol, -EINVAL),
/* end marker */
- {.dtb_begin = NULL, .dtb_end = NULL, .expected_result = 0, .name = NULL}
+ {.dtbo_begin = NULL, .dtbo_end = NULL, .expected_result = 0, .name = NULL}
};
static struct device_node *overlay_base_root;
return;
}
- data_size = info->dtb_end - info->dtb_begin;
+ data_size = info->dtbo_end - info->dtbo_begin;
if (!data_size) {
pr_err("No dtb 'overlay_base' to attach\n");
return;
}
- size = fdt_totalsize(info->dtb_begin);
+ size = fdt_totalsize(info->dtbo_begin);
if (size != data_size) {
pr_err("dtb 'overlay_base' header totalsize != actual size");
return;
return;
}
- memcpy(new_fdt, info->dtb_begin, size);
+ memcpy(new_fdt, info->dtbo_begin, size);
__unflatten_device_tree(new_fdt, NULL, &overlay_base_root,
dt_alloc_memory, true);
return 0;
}
- size = info->dtb_end - info->dtb_begin;
+ size = info->dtbo_end - info->dtbo_begin;
if (!size)
pr_err("no overlay data for %s\n", overlay_name);
- ret = of_overlay_fdt_apply(info->dtb_begin, size, &info->ovcs_id);
+ ret = of_overlay_fdt_apply(info->dtbo_begin, size, &info->ovcs_id);
if (ovcs_id)
*ovcs_id = info->ovcs_id;
if (ret < 0)