From e87cacadebaf3c03584fbfb540303301cd2c2cbc Mon Sep 17 00:00:00 2001 From: Frank Rowand Date: Mon, 24 Oct 2022 12:34:30 -0500 Subject: of: overlay: rename overlay source files from .dts to .dtso In drivers/of/unittest-data/: - Rename .dts overlay source files to use .dtso suffix. Modify driver/of/unitest.c to use .dtbo.o based symbols instead of .dtb.o Signed-off-by: Frank Rowand Signed-off-by: Andrew Davis Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Tested-by: Frank Rowand Link: https://lore.kernel.org/r/20221024173434.32518-4-afd@ti.com Signed-off-by: Rob Herring --- drivers/of/unittest-data/Makefile | 66 +++++++++++----------- drivers/of/unittest-data/overlay.dts | 64 --------------------- drivers/of/unittest-data/overlay.dtso | 64 +++++++++++++++++++++ drivers/of/unittest-data/overlay_0.dts | 14 ----- drivers/of/unittest-data/overlay_0.dtso | 14 +++++ drivers/of/unittest-data/overlay_1.dts | 14 ----- drivers/of/unittest-data/overlay_1.dtso | 14 +++++ drivers/of/unittest-data/overlay_10.dts | 27 --------- drivers/of/unittest-data/overlay_10.dtso | 27 +++++++++ drivers/of/unittest-data/overlay_11.dts | 28 --------- drivers/of/unittest-data/overlay_11.dtso | 28 +++++++++ drivers/of/unittest-data/overlay_12.dts | 14 ----- drivers/of/unittest-data/overlay_12.dtso | 14 +++++ drivers/of/unittest-data/overlay_13.dts | 14 ----- drivers/of/unittest-data/overlay_13.dtso | 14 +++++ drivers/of/unittest-data/overlay_15.dts | 30 ---------- drivers/of/unittest-data/overlay_15.dtso | 30 ++++++++++ drivers/of/unittest-data/overlay_16.dts | 15 ----- drivers/of/unittest-data/overlay_16.dtso | 15 +++++ drivers/of/unittest-data/overlay_17.dts | 15 ----- drivers/of/unittest-data/overlay_17.dtso | 15 +++++ drivers/of/unittest-data/overlay_18.dts | 15 ----- drivers/of/unittest-data/overlay_18.dtso | 15 +++++ drivers/of/unittest-data/overlay_19.dts | 15 ----- drivers/of/unittest-data/overlay_19.dtso | 15 +++++ drivers/of/unittest-data/overlay_2.dts | 9 --- drivers/of/unittest-data/overlay_2.dtso | 9 +++ drivers/of/unittest-data/overlay_20.dts | 15 ----- drivers/of/unittest-data/overlay_20.dtso | 15 +++++ drivers/of/unittest-data/overlay_3.dts | 9 --- drivers/of/unittest-data/overlay_3.dtso | 9 +++ drivers/of/unittest-data/overlay_4.dts | 18 ------ drivers/of/unittest-data/overlay_4.dtso | 18 ++++++ drivers/of/unittest-data/overlay_5.dts | 9 --- drivers/of/unittest-data/overlay_5.dtso | 9 +++ drivers/of/unittest-data/overlay_6.dts | 10 ---- drivers/of/unittest-data/overlay_6.dtso | 10 ++++ drivers/of/unittest-data/overlay_7.dts | 10 ---- drivers/of/unittest-data/overlay_7.dtso | 10 ++++ drivers/of/unittest-data/overlay_8.dts | 10 ---- drivers/of/unittest-data/overlay_8.dtso | 10 ++++ drivers/of/unittest-data/overlay_9.dts | 10 ---- drivers/of/unittest-data/overlay_9.dtso | 10 ++++ .../of/unittest-data/overlay_bad_add_dup_node.dts | 28 --------- .../of/unittest-data/overlay_bad_add_dup_node.dtso | 28 +++++++++ .../of/unittest-data/overlay_bad_add_dup_prop.dts | 39 ------------- .../of/unittest-data/overlay_bad_add_dup_prop.dtso | 39 +++++++++++++ drivers/of/unittest-data/overlay_bad_phandle.dts | 14 ----- drivers/of/unittest-data/overlay_bad_phandle.dtso | 14 +++++ drivers/of/unittest-data/overlay_bad_symbol.dts | 16 ------ drivers/of/unittest-data/overlay_bad_symbol.dtso | 16 ++++++ drivers/of/unittest-data/overlay_base.dts | 5 -- drivers/of/unittest-data/overlay_base.dtso | 5 ++ drivers/of/unittest-data/overlay_gpio_01.dts | 23 -------- drivers/of/unittest-data/overlay_gpio_01.dtso | 23 ++++++++ drivers/of/unittest-data/overlay_gpio_02a.dts | 16 ------ drivers/of/unittest-data/overlay_gpio_02a.dtso | 16 ++++++ drivers/of/unittest-data/overlay_gpio_02b.dts | 16 ------ drivers/of/unittest-data/overlay_gpio_02b.dtso | 16 ++++++ drivers/of/unittest-data/overlay_gpio_03.dts | 23 -------- drivers/of/unittest-data/overlay_gpio_03.dtso | 23 ++++++++ drivers/of/unittest-data/overlay_gpio_04a.dts | 16 ------ drivers/of/unittest-data/overlay_gpio_04a.dtso | 16 ++++++ drivers/of/unittest-data/overlay_gpio_04b.dts | 16 ------ drivers/of/unittest-data/overlay_gpio_04b.dtso | 16 ++++++ drivers/of/unittest-data/testcases.dts | 21 ------- drivers/of/unittest-data/testcases.dtso | 21 +++++++ drivers/of/unittest.c | 48 ++++++++-------- 68 files changed, 655 insertions(+), 655 deletions(-) delete mode 100644 drivers/of/unittest-data/overlay.dts create mode 100644 drivers/of/unittest-data/overlay.dtso delete mode 100644 drivers/of/unittest-data/overlay_0.dts create mode 100644 drivers/of/unittest-data/overlay_0.dtso delete mode 100644 drivers/of/unittest-data/overlay_1.dts create mode 100644 drivers/of/unittest-data/overlay_1.dtso delete mode 100644 drivers/of/unittest-data/overlay_10.dts create mode 100644 drivers/of/unittest-data/overlay_10.dtso delete mode 100644 drivers/of/unittest-data/overlay_11.dts create mode 100644 drivers/of/unittest-data/overlay_11.dtso delete mode 100644 drivers/of/unittest-data/overlay_12.dts create mode 100644 drivers/of/unittest-data/overlay_12.dtso delete mode 100644 drivers/of/unittest-data/overlay_13.dts create mode 100644 drivers/of/unittest-data/overlay_13.dtso delete mode 100644 drivers/of/unittest-data/overlay_15.dts create mode 100644 drivers/of/unittest-data/overlay_15.dtso delete mode 100644 drivers/of/unittest-data/overlay_16.dts create mode 100644 drivers/of/unittest-data/overlay_16.dtso delete mode 100644 drivers/of/unittest-data/overlay_17.dts create mode 100644 drivers/of/unittest-data/overlay_17.dtso delete mode 100644 drivers/of/unittest-data/overlay_18.dts create mode 100644 drivers/of/unittest-data/overlay_18.dtso delete mode 100644 drivers/of/unittest-data/overlay_19.dts create mode 100644 drivers/of/unittest-data/overlay_19.dtso delete mode 100644 drivers/of/unittest-data/overlay_2.dts create mode 100644 drivers/of/unittest-data/overlay_2.dtso delete mode 100644 drivers/of/unittest-data/overlay_20.dts create mode 100644 drivers/of/unittest-data/overlay_20.dtso delete mode 100644 drivers/of/unittest-data/overlay_3.dts create mode 100644 drivers/of/unittest-data/overlay_3.dtso delete mode 100644 drivers/of/unittest-data/overlay_4.dts create mode 100644 drivers/of/unittest-data/overlay_4.dtso delete mode 100644 drivers/of/unittest-data/overlay_5.dts create mode 100644 drivers/of/unittest-data/overlay_5.dtso delete mode 100644 drivers/of/unittest-data/overlay_6.dts create mode 100644 drivers/of/unittest-data/overlay_6.dtso delete mode 100644 drivers/of/unittest-data/overlay_7.dts create mode 100644 drivers/of/unittest-data/overlay_7.dtso delete mode 100644 drivers/of/unittest-data/overlay_8.dts create mode 100644 drivers/of/unittest-data/overlay_8.dtso delete mode 100644 drivers/of/unittest-data/overlay_9.dts create mode 100644 drivers/of/unittest-data/overlay_9.dtso delete mode 100644 drivers/of/unittest-data/overlay_bad_add_dup_node.dts create mode 100644 drivers/of/unittest-data/overlay_bad_add_dup_node.dtso delete mode 100644 drivers/of/unittest-data/overlay_bad_add_dup_prop.dts create mode 100644 drivers/of/unittest-data/overlay_bad_add_dup_prop.dtso delete mode 100644 drivers/of/unittest-data/overlay_bad_phandle.dts create mode 100644 drivers/of/unittest-data/overlay_bad_phandle.dtso delete mode 100644 drivers/of/unittest-data/overlay_bad_symbol.dts create mode 100644 drivers/of/unittest-data/overlay_bad_symbol.dtso delete mode 100644 drivers/of/unittest-data/overlay_base.dts create mode 100644 drivers/of/unittest-data/overlay_base.dtso delete mode 100644 drivers/of/unittest-data/overlay_gpio_01.dts create mode 100644 drivers/of/unittest-data/overlay_gpio_01.dtso delete mode 100644 drivers/of/unittest-data/overlay_gpio_02a.dts create mode 100644 drivers/of/unittest-data/overlay_gpio_02a.dtso delete mode 100644 drivers/of/unittest-data/overlay_gpio_02b.dts create mode 100644 drivers/of/unittest-data/overlay_gpio_02b.dtso delete mode 100644 drivers/of/unittest-data/overlay_gpio_03.dts create mode 100644 drivers/of/unittest-data/overlay_gpio_03.dtso delete mode 100644 drivers/of/unittest-data/overlay_gpio_04a.dts create mode 100644 drivers/of/unittest-data/overlay_gpio_04a.dtso delete mode 100644 drivers/of/unittest-data/overlay_gpio_04b.dts create mode 100644 drivers/of/unittest-data/overlay_gpio_04b.dtso delete mode 100644 drivers/of/unittest-data/testcases.dts create mode 100644 drivers/of/unittest-data/testcases.dtso (limited to 'drivers/of') diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile index d072f3ba3971..ea5f4da68e23 100644 --- a/drivers/of/unittest-data/Makefile +++ b/drivers/of/unittest-data/Makefile @@ -1,38 +1,38 @@ # 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 += -@ diff --git a/drivers/of/unittest-data/overlay.dts b/drivers/of/unittest-data/overlay.dts deleted file mode 100644 index 3bbc59e922fe..000000000000 --- a/drivers/of/unittest-data/overlay.dts +++ /dev/null @@ -1,64 +0,0 @@ -// 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 >; -}; diff --git a/drivers/of/unittest-data/overlay.dtso b/drivers/of/unittest-data/overlay.dtso new file mode 100644 index 000000000000..3bbc59e922fe --- /dev/null +++ b/drivers/of/unittest-data/overlay.dtso @@ -0,0 +1,64 @@ +// 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 >; +}; diff --git a/drivers/of/unittest-data/overlay_0.dts b/drivers/of/unittest-data/overlay_0.dts deleted file mode 100644 index ac0f9e0fe65f..000000000000 --- a/drivers/of/unittest-data/overlay_0.dts +++ /dev/null @@ -1,14 +0,0 @@ -// 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"; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_0.dtso b/drivers/of/unittest-data/overlay_0.dtso new file mode 100644 index 000000000000..ac0f9e0fe65f --- /dev/null +++ b/drivers/of/unittest-data/overlay_0.dtso @@ -0,0 +1,14 @@ +// 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"; + }; + }; +}; diff --git a/drivers/of/unittest-data/overlay_1.dts b/drivers/of/unittest-data/overlay_1.dts deleted file mode 100644 index e92a626e2948..000000000000 --- a/drivers/of/unittest-data/overlay_1.dts +++ /dev/null @@ -1,14 +0,0 @@ -// 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"; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_1.dtso b/drivers/of/unittest-data/overlay_1.dtso new file mode 100644 index 000000000000..e92a626e2948 --- /dev/null +++ b/drivers/of/unittest-data/overlay_1.dtso @@ -0,0 +1,14 @@ +// 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"; + }; + }; +}; diff --git a/drivers/of/unittest-data/overlay_10.dts b/drivers/of/unittest-data/overlay_10.dts deleted file mode 100644 index 73993bf23bf8..000000000000 --- a/drivers/of/unittest-data/overlay_10.dts +++ /dev/null @@ -1,27 +0,0 @@ -// 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>; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_10.dtso b/drivers/of/unittest-data/overlay_10.dtso new file mode 100644 index 000000000000..73993bf23bf8 --- /dev/null +++ b/drivers/of/unittest-data/overlay_10.dtso @@ -0,0 +1,27 @@ +// 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>; + }; + }; +}; diff --git a/drivers/of/unittest-data/overlay_11.dts b/drivers/of/unittest-data/overlay_11.dts deleted file mode 100644 index 9a79b253a809..000000000000 --- a/drivers/of/unittest-data/overlay_11.dts +++ /dev/null @@ -1,28 +0,0 @@ -// 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>; - }; - - }; -}; diff --git a/drivers/of/unittest-data/overlay_11.dtso b/drivers/of/unittest-data/overlay_11.dtso new file mode 100644 index 000000000000..9a79b253a809 --- /dev/null +++ b/drivers/of/unittest-data/overlay_11.dtso @@ -0,0 +1,28 @@ +// 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>; + }; + + }; +}; diff --git a/drivers/of/unittest-data/overlay_12.dts b/drivers/of/unittest-data/overlay_12.dts deleted file mode 100644 index ca3441e2cbec..000000000000 --- a/drivers/of/unittest-data/overlay_12.dts +++ /dev/null @@ -1,14 +0,0 @@ -// 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"; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_12.dtso b/drivers/of/unittest-data/overlay_12.dtso new file mode 100644 index 000000000000..ca3441e2cbec --- /dev/null +++ b/drivers/of/unittest-data/overlay_12.dtso @@ -0,0 +1,14 @@ +// 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"; + }; + }; +}; diff --git a/drivers/of/unittest-data/overlay_13.dts b/drivers/of/unittest-data/overlay_13.dts deleted file mode 100644 index 3c30dec63894..000000000000 --- a/drivers/of/unittest-data/overlay_13.dts +++ /dev/null @@ -1,14 +0,0 @@ -// 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"; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_13.dtso b/drivers/of/unittest-data/overlay_13.dtso new file mode 100644 index 000000000000..3c30dec63894 --- /dev/null +++ b/drivers/of/unittest-data/overlay_13.dtso @@ -0,0 +1,14 @@ +// 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"; + }; + }; +}; diff --git a/drivers/of/unittest-data/overlay_15.dts b/drivers/of/unittest-data/overlay_15.dts deleted file mode 100644 index 5728490474f6..000000000000 --- a/drivers/of/unittest-data/overlay_15.dts +++ /dev/null @@ -1,30 +0,0 @@ -// 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"; - }; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_15.dtso b/drivers/of/unittest-data/overlay_15.dtso new file mode 100644 index 000000000000..5728490474f6 --- /dev/null +++ b/drivers/of/unittest-data/overlay_15.dtso @@ -0,0 +1,30 @@ +// 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"; + }; + }; + }; +}; diff --git a/drivers/of/unittest-data/overlay_16.dts b/drivers/of/unittest-data/overlay_16.dts deleted file mode 100644 index 80a46dc02581..000000000000 --- a/drivers/of/unittest-data/overlay_16.dts +++ /dev/null @@ -1,15 +0,0 @@ -// 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>; - }; -}; diff --git a/drivers/of/unittest-data/overlay_16.dtso b/drivers/of/unittest-data/overlay_16.dtso new file mode 100644 index 000000000000..80a46dc02581 --- /dev/null +++ b/drivers/of/unittest-data/overlay_16.dtso @@ -0,0 +1,15 @@ +// 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>; + }; +}; diff --git a/drivers/of/unittest-data/overlay_17.dts b/drivers/of/unittest-data/overlay_17.dts deleted file mode 100644 index 5b8a2209177f..000000000000 --- a/drivers/of/unittest-data/overlay_17.dts +++ /dev/null @@ -1,15 +0,0 @@ -// 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>; - }; -}; diff --git a/drivers/of/unittest-data/overlay_17.dtso b/drivers/of/unittest-data/overlay_17.dtso new file mode 100644 index 000000000000..5b8a2209177f --- /dev/null +++ b/drivers/of/unittest-data/overlay_17.dtso @@ -0,0 +1,15 @@ +// 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>; + }; +}; diff --git a/drivers/of/unittest-data/overlay_18.dts b/drivers/of/unittest-data/overlay_18.dts deleted file mode 100644 index dcddd5f6d301..000000000000 --- a/drivers/of/unittest-data/overlay_18.dts +++ /dev/null @@ -1,15 +0,0 @@ -// 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>; - }; -}; diff --git a/drivers/of/unittest-data/overlay_18.dtso b/drivers/of/unittest-data/overlay_18.dtso new file mode 100644 index 000000000000..dcddd5f6d301 --- /dev/null +++ b/drivers/of/unittest-data/overlay_18.dtso @@ -0,0 +1,15 @@ +// 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>; + }; +}; diff --git a/drivers/of/unittest-data/overlay_19.dts b/drivers/of/unittest-data/overlay_19.dts deleted file mode 100644 index 32b3ba0b66a3..000000000000 --- a/drivers/of/unittest-data/overlay_19.dts +++ /dev/null @@ -1,15 +0,0 @@ -// 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>; - }; -}; diff --git a/drivers/of/unittest-data/overlay_19.dtso b/drivers/of/unittest-data/overlay_19.dtso new file mode 100644 index 000000000000..32b3ba0b66a3 --- /dev/null +++ b/drivers/of/unittest-data/overlay_19.dtso @@ -0,0 +1,15 @@ +// 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>; + }; +}; diff --git a/drivers/of/unittest-data/overlay_2.dts b/drivers/of/unittest-data/overlay_2.dts deleted file mode 100644 index db8684ba89d9..000000000000 --- a/drivers/of/unittest-data/overlay_2.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; -/plugin/; - -/* overlay_2 - enable using label */ - -&unittest2 { - status = "okay"; -}; diff --git a/drivers/of/unittest-data/overlay_2.dtso b/drivers/of/unittest-data/overlay_2.dtso new file mode 100644 index 000000000000..db8684ba89d9 --- /dev/null +++ b/drivers/of/unittest-data/overlay_2.dtso @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +/plugin/; + +/* overlay_2 - enable using label */ + +&unittest2 { + status = "okay"; +}; diff --git a/drivers/of/unittest-data/overlay_20.dts b/drivers/of/unittest-data/overlay_20.dts deleted file mode 100644 index d4a4f2f32ec7..000000000000 --- a/drivers/of/unittest-data/overlay_20.dts +++ /dev/null @@ -1,15 +0,0 @@ -// 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>; - }; -}; diff --git a/drivers/of/unittest-data/overlay_20.dtso b/drivers/of/unittest-data/overlay_20.dtso new file mode 100644 index 000000000000..d4a4f2f32ec7 --- /dev/null +++ b/drivers/of/unittest-data/overlay_20.dtso @@ -0,0 +1,15 @@ +// 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>; + }; +}; diff --git a/drivers/of/unittest-data/overlay_3.dts b/drivers/of/unittest-data/overlay_3.dts deleted file mode 100644 index 40f289e7c237..000000000000 --- a/drivers/of/unittest-data/overlay_3.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; -/plugin/; - -/* overlay_3 - disable using label */ - -&unittest3 { - status = "disabled"; -}; diff --git a/drivers/of/unittest-data/overlay_3.dtso b/drivers/of/unittest-data/overlay_3.dtso new file mode 100644 index 000000000000..40f289e7c237 --- /dev/null +++ b/drivers/of/unittest-data/overlay_3.dtso @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +/plugin/; + +/* overlay_3 - disable using label */ + +&unittest3 { + status = "disabled"; +}; diff --git a/drivers/of/unittest-data/overlay_4.dts b/drivers/of/unittest-data/overlay_4.dts deleted file mode 100644 index a8a77ddf9abe..000000000000 --- a/drivers/of/unittest-data/overlay_4.dts +++ /dev/null @@ -1,18 +0,0 @@ -// 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>; - }; -}; diff --git a/drivers/of/unittest-data/overlay_4.dtso b/drivers/of/unittest-data/overlay_4.dtso new file mode 100644 index 000000000000..a8a77ddf9abe --- /dev/null +++ b/drivers/of/unittest-data/overlay_4.dtso @@ -0,0 +1,18 @@ +// 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>; + }; +}; diff --git a/drivers/of/unittest-data/overlay_5.dts b/drivers/of/unittest-data/overlay_5.dts deleted file mode 100644 index 706f5f1b737c..000000000000 --- a/drivers/of/unittest-data/overlay_5.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; -/plugin/; - -/* overlay_5 - test overlay apply revert */ - -&unittest5 { - status = "okay"; -}; diff --git a/drivers/of/unittest-data/overlay_5.dtso b/drivers/of/unittest-data/overlay_5.dtso new file mode 100644 index 000000000000..706f5f1b737c --- /dev/null +++ b/drivers/of/unittest-data/overlay_5.dtso @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +/plugin/; + +/* overlay_5 - test overlay apply revert */ + +&unittest5 { + status = "okay"; +}; diff --git a/drivers/of/unittest-data/overlay_6.dts b/drivers/of/unittest-data/overlay_6.dts deleted file mode 100644 index 21a7fa4ca45e..000000000000 --- a/drivers/of/unittest-data/overlay_6.dts +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; -/plugin/; - -/* overlay_6 */ -/* overlays 6, 7 application and removal in sequence */ - -&unittest6 { - status = "okay"; -}; diff --git a/drivers/of/unittest-data/overlay_6.dtso b/drivers/of/unittest-data/overlay_6.dtso new file mode 100644 index 000000000000..21a7fa4ca45e --- /dev/null +++ b/drivers/of/unittest-data/overlay_6.dtso @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +/plugin/; + +/* overlay_6 */ +/* overlays 6, 7 application and removal in sequence */ + +&unittest6 { + status = "okay"; +}; diff --git a/drivers/of/unittest-data/overlay_7.dts b/drivers/of/unittest-data/overlay_7.dts deleted file mode 100644 index 58ba1bb51b50..000000000000 --- a/drivers/of/unittest-data/overlay_7.dts +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; -/plugin/; - -/* overlay_7 */ -/* overlays 6, 7 application and removal in sequence */ - -&unittest7 { - status = "okay"; -}; diff --git a/drivers/of/unittest-data/overlay_7.dtso b/drivers/of/unittest-data/overlay_7.dtso new file mode 100644 index 000000000000..58ba1bb51b50 --- /dev/null +++ b/drivers/of/unittest-data/overlay_7.dtso @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +/plugin/; + +/* overlay_7 */ +/* overlays 6, 7 application and removal in sequence */ + +&unittest7 { + status = "okay"; +}; diff --git a/drivers/of/unittest-data/overlay_8.dts b/drivers/of/unittest-data/overlay_8.dts deleted file mode 100644 index e9718d118e38..000000000000 --- a/drivers/of/unittest-data/overlay_8.dts +++ /dev/null @@ -1,10 +0,0 @@ -// 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"; -}; diff --git a/drivers/of/unittest-data/overlay_8.dtso b/drivers/of/unittest-data/overlay_8.dtso new file mode 100644 index 000000000000..e9718d118e38 --- /dev/null +++ b/drivers/of/unittest-data/overlay_8.dtso @@ -0,0 +1,10 @@ +// 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"; +}; diff --git a/drivers/of/unittest-data/overlay_9.dts b/drivers/of/unittest-data/overlay_9.dts deleted file mode 100644 index b35e23edae50..000000000000 --- a/drivers/of/unittest-data/overlay_9.dts +++ /dev/null @@ -1,10 +0,0 @@ -// 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"; -}; diff --git a/drivers/of/unittest-data/overlay_9.dtso b/drivers/of/unittest-data/overlay_9.dtso new file mode 100644 index 000000000000..b35e23edae50 --- /dev/null +++ b/drivers/of/unittest-data/overlay_9.dtso @@ -0,0 +1,10 @@ +// 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"; +}; diff --git a/drivers/of/unittest-data/overlay_bad_add_dup_node.dts b/drivers/of/unittest-data/overlay_bad_add_dup_node.dts deleted file mode 100644 index 145dfc3b1024..000000000000 --- a/drivers/of/unittest-data/overlay_bad_add_dup_node.dts +++ /dev/null @@ -1,28 +0,0 @@ -// 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 >; - }; -}; diff --git a/drivers/of/unittest-data/overlay_bad_add_dup_node.dtso b/drivers/of/unittest-data/overlay_bad_add_dup_node.dtso new file mode 100644 index 000000000000..145dfc3b1024 --- /dev/null +++ b/drivers/of/unittest-data/overlay_bad_add_dup_node.dtso @@ -0,0 +1,28 @@ +// 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 >; + }; +}; diff --git a/drivers/of/unittest-data/overlay_bad_add_dup_prop.dts b/drivers/of/unittest-data/overlay_bad_add_dup_prop.dts deleted file mode 100644 index 6327d1ffb963..000000000000 --- a/drivers/of/unittest-data/overlay_bad_add_dup_prop.dts +++ /dev/null @@ -1,39 +0,0 @@ -// 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 >; - }; -}; diff --git a/drivers/of/unittest-data/overlay_bad_add_dup_prop.dtso b/drivers/of/unittest-data/overlay_bad_add_dup_prop.dtso new file mode 100644 index 000000000000..6327d1ffb963 --- /dev/null +++ b/drivers/of/unittest-data/overlay_bad_add_dup_prop.dtso @@ -0,0 +1,39 @@ +// 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 >; + }; +}; diff --git a/drivers/of/unittest-data/overlay_bad_phandle.dts b/drivers/of/unittest-data/overlay_bad_phandle.dts deleted file mode 100644 index 83b797360318..000000000000 --- a/drivers/of/unittest-data/overlay_bad_phandle.dts +++ /dev/null @@ -1,14 +0,0 @@ -// 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 >; - }; -}; diff --git a/drivers/of/unittest-data/overlay_bad_phandle.dtso b/drivers/of/unittest-data/overlay_bad_phandle.dtso new file mode 100644 index 000000000000..83b797360318 --- /dev/null +++ b/drivers/of/unittest-data/overlay_bad_phandle.dtso @@ -0,0 +1,14 @@ +// 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 >; + }; +}; diff --git a/drivers/of/unittest-data/overlay_bad_symbol.dts b/drivers/of/unittest-data/overlay_bad_symbol.dts deleted file mode 100644 index 98c6d1de144a..000000000000 --- a/drivers/of/unittest-data/overlay_bad_symbol.dts +++ /dev/null @@ -1,16 +0,0 @@ -// 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 >; - }; - -}; diff --git a/drivers/of/unittest-data/overlay_bad_symbol.dtso b/drivers/of/unittest-data/overlay_bad_symbol.dtso new file mode 100644 index 000000000000..98c6d1de144a --- /dev/null +++ b/drivers/of/unittest-data/overlay_bad_symbol.dtso @@ -0,0 +1,16 @@ +// 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 >; + }; + +}; diff --git a/drivers/of/unittest-data/overlay_base.dts b/drivers/of/unittest-data/overlay_base.dts deleted file mode 100644 index ab9014589c5d..000000000000 --- a/drivers/of/unittest-data/overlay_base.dts +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; -/plugin/; - -#include "overlay_common.dtsi" diff --git a/drivers/of/unittest-data/overlay_base.dtso b/drivers/of/unittest-data/overlay_base.dtso new file mode 100644 index 000000000000..ab9014589c5d --- /dev/null +++ b/drivers/of/unittest-data/overlay_base.dtso @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +/plugin/; + +#include "overlay_common.dtsi" diff --git a/drivers/of/unittest-data/overlay_gpio_01.dts b/drivers/of/unittest-data/overlay_gpio_01.dts deleted file mode 100644 index 699ff104ae10..000000000000 --- a/drivers/of/unittest-data/overlay_gpio_01.dts +++ /dev/null @@ -1,23 +0,0 @@ -// 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"; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_gpio_01.dtso b/drivers/of/unittest-data/overlay_gpio_01.dtso new file mode 100644 index 000000000000..699ff104ae10 --- /dev/null +++ b/drivers/of/unittest-data/overlay_gpio_01.dtso @@ -0,0 +1,23 @@ +// 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"; + }; + }; +}; diff --git a/drivers/of/unittest-data/overlay_gpio_02a.dts b/drivers/of/unittest-data/overlay_gpio_02a.dts deleted file mode 100644 index ec59aff6ed47..000000000000 --- a/drivers/of/unittest-data/overlay_gpio_02a.dts +++ /dev/null @@ -1,16 +0,0 @@ -// 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"; - }; -}; diff --git a/drivers/of/unittest-data/overlay_gpio_02a.dtso b/drivers/of/unittest-data/overlay_gpio_02a.dtso new file mode 100644 index 000000000000..ec59aff6ed47 --- /dev/null +++ b/drivers/of/unittest-data/overlay_gpio_02a.dtso @@ -0,0 +1,16 @@ +// 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"; + }; +}; diff --git a/drivers/of/unittest-data/overlay_gpio_02b.dts b/drivers/of/unittest-data/overlay_gpio_02b.dts deleted file mode 100644 index 43ce111d41ce..000000000000 --- a/drivers/of/unittest-data/overlay_gpio_02b.dts +++ /dev/null @@ -1,16 +0,0 @@ -// 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"; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_gpio_02b.dtso b/drivers/of/unittest-data/overlay_gpio_02b.dtso new file mode 100644 index 000000000000..43ce111d41ce --- /dev/null +++ b/drivers/of/unittest-data/overlay_gpio_02b.dtso @@ -0,0 +1,16 @@ +// 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"; + }; + }; +}; diff --git a/drivers/of/unittest-data/overlay_gpio_03.dts b/drivers/of/unittest-data/overlay_gpio_03.dts deleted file mode 100644 index 6e0312340a1b..000000000000 --- a/drivers/of/unittest-data/overlay_gpio_03.dts +++ /dev/null @@ -1,23 +0,0 @@ -// 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"; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_gpio_03.dtso b/drivers/of/unittest-data/overlay_gpio_03.dtso new file mode 100644 index 000000000000..6e0312340a1b --- /dev/null +++ b/drivers/of/unittest-data/overlay_gpio_03.dtso @@ -0,0 +1,23 @@ +// 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"; + }; + }; +}; diff --git a/drivers/of/unittest-data/overlay_gpio_04a.dts b/drivers/of/unittest-data/overlay_gpio_04a.dts deleted file mode 100644 index 7b1e04ebfa7a..000000000000 --- a/drivers/of/unittest-data/overlay_gpio_04a.dts +++ /dev/null @@ -1,16 +0,0 @@ -// 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"; - }; -}; diff --git a/drivers/of/unittest-data/overlay_gpio_04a.dtso b/drivers/of/unittest-data/overlay_gpio_04a.dtso new file mode 100644 index 000000000000..7b1e04ebfa7a --- /dev/null +++ b/drivers/of/unittest-data/overlay_gpio_04a.dtso @@ -0,0 +1,16 @@ +// 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"; + }; +}; diff --git a/drivers/of/unittest-data/overlay_gpio_04b.dts b/drivers/of/unittest-data/overlay_gpio_04b.dts deleted file mode 100644 index a14e95c6699a..000000000000 --- a/drivers/of/unittest-data/overlay_gpio_04b.dts +++ /dev/null @@ -1,16 +0,0 @@ -// 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"; - }; - }; -}; diff --git a/drivers/of/unittest-data/overlay_gpio_04b.dtso b/drivers/of/unittest-data/overlay_gpio_04b.dtso new file mode 100644 index 000000000000..a14e95c6699a --- /dev/null +++ b/drivers/of/unittest-data/overlay_gpio_04b.dtso @@ -0,0 +1,16 @@ +// 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"; + }; + }; +}; diff --git a/drivers/of/unittest-data/testcases.dts b/drivers/of/unittest-data/testcases.dts deleted file mode 100644 index 61cdd3d5fccb..000000000000 --- a/drivers/of/unittest-data/testcases.dts +++ /dev/null @@ -1,21 +0,0 @@ -// 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 */ - }; - }; - -}; diff --git a/drivers/of/unittest-data/testcases.dtso b/drivers/of/unittest-data/testcases.dtso new file mode 100644 index 000000000000..61cdd3d5fccb --- /dev/null +++ b/drivers/of/unittest-data/testcases.dtso @@ -0,0 +1,21 @@ +// 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 */ + }; + }; + +}; diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index b89ab5d9fea5..1d810c0e18f8 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1423,12 +1423,12 @@ static int __init unittest_data_add(void) 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; @@ -1443,7 +1443,7 @@ static int __init unittest_data_add(void) 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) { @@ -3003,24 +3003,24 @@ static inline void __init of_unittest_overlay(void) { } #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; @@ -3094,7 +3094,7 @@ static struct overlay_info overlays[] = { 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; @@ -3151,13 +3151,13 @@ void __init unittest_unflatten_overlay_base(void) 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; @@ -3169,7 +3169,7 @@ void __init unittest_unflatten_overlay_base(void) 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); @@ -3204,11 +3204,11 @@ static int __init overlay_data_apply(const char *overlay_name, int *ovcs_id) 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) -- cgit v1.2.3