diff options
Diffstat (limited to 'drivers/of/unittest-data')
-rw-r--r-- | drivers/of/unittest-data/Makefile | 19 | ||||
-rw-r--r-- | drivers/of/unittest-data/overlay.dts | 31 | ||||
-rw-r--r-- | drivers/of/unittest-data/overlay_bad_symbol.dts | 22 | ||||
-rw-r--r-- | drivers/of/unittest-data/overlay_base.dts | 11 |
4 files changed, 74 insertions, 9 deletions
diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile index 6e00a9c69e58..2d135fba94c1 100644 --- a/drivers/of/unittest-data/Makefile +++ b/drivers/of/unittest-data/Makefile @@ -1,18 +1,27 @@ obj-y += testcases.dtb.o + +targets += testcases.dtb testcases.dtb.S + +ifdef CONFIG_OF_OVERLAY + obj-y += overlay.dtb.o obj-y += overlay_bad_phandle.dtb.o +obj-y += overlay_bad_symbol.dtb.o obj-y += overlay_base.dtb.o -targets += testcases.dtb testcases.dtb.S targets += overlay.dtb overlay.dtb.S targets += overlay_bad_phandle.dtb overlay_bad_phandle.dtb.S +targets += overlay_bad_symbol.dtb overlay_bad_symbol.dtb.S targets += overlay_base.dtb overlay_base.dtb.S -.PRECIOUS: \ - $(obj)/%.dtb.S \ - $(obj)/%.dtb - # enable creation of __symbols__ node DTC_FLAGS_overlay := -@ DTC_FLAGS_overlay_bad_phandle := -@ +DTC_FLAGS_overlay_bad_symbol := -@ DTC_FLAGS_overlay_base := -@ + +endif + +.PRECIOUS: \ + $(obj)/%.dtb.S \ + $(obj)/%.dtb diff --git a/drivers/of/unittest-data/overlay.dts b/drivers/of/unittest-data/overlay.dts index 6cd7e6a0c13e..9e791fcf05dd 100644 --- a/drivers/of/unittest-data/overlay.dts +++ b/drivers/of/unittest-data/overlay.dts @@ -7,7 +7,7 @@ target = <&electric_1>; __overlay__ { - status = "ok"; + status = "okay"; hvac_2: hvac-large-1 { compatible = "ot,hvac-large"; @@ -23,9 +23,24 @@ __overlay__ { #address-cells = <1>; #size-cells = <1>; - status = "ok"; + status = "okay"; - ride@200 { + 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 >; @@ -36,6 +51,14 @@ spin-rph = < 30 >; gondolas = < 16 >; gondola-capacity = < 6 >; + + ride_200_left: track@10 { + reg = < 0x00000010 0x10 >; + }; + + ride_200_right: track@20 { + reg = < 0x00000020 0x10 >; + }; }; }; }; @@ -44,7 +67,7 @@ target = <&lights_2>; __overlay__ { - status = "ok"; + status = "okay"; color = "purple", "white", "red", "green"; rate = < 3 256 >; }; diff --git a/drivers/of/unittest-data/overlay_bad_symbol.dts b/drivers/of/unittest-data/overlay_bad_symbol.dts new file mode 100644 index 000000000000..09261cb9a67e --- /dev/null +++ b/drivers/of/unittest-data/overlay_bad_symbol.dts @@ -0,0 +1,22 @@ +/dts-v1/; +/plugin/; + +/ { + + fragment@0 { + target = <&electric_1>; + + __overlay__ { + + // 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 index 5566b27fb61a..453d0bd83320 100644 --- a/drivers/of/unittest-data/overlay_base.dts +++ b/drivers/of/unittest-data/overlay_base.dts @@ -44,6 +44,8 @@ orientation = < 127 >; ride@100 { + #address-cells = <1>; + #size-cells = <1>; compatible = "ot,roller-coaster"; reg = < 0x00000100 0x100 >; hvac-provider = < &hvac_1 >; @@ -53,6 +55,15 @@ spin-controller = < &spin_ctrl_2 5 &spin_ctrl_2 7 >; spin-controller-names = "track_1", "track_2"; queues = < 2 >; + + track@30 { + reg = < 0x00000030 0x10 >; + }; + + track@40 { + reg = < 0x00000040 0x10 >; + }; + }; }; |