aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn Bonesio <bones@secretlab.ca>2010-11-02 15:55:04 -0700
committerJon Loeliger <jdl@jdl.com>2010-11-13 14:44:06 -0600
commit73ae43ea44a40c2ac00dd94523f270177a1e72e9 (patch)
tree43362bbc2f133e2b5880fbad9b3829c716ec7698 /tests
parentc0fa2e6d4e59e62f2e9f23db1a2d94532fa4ae98 (diff)
downloaddtc-73ae43ea44a40c2ac00dd94523f270177a1e72e9.zip
dtc-73ae43ea44a40c2ac00dd94523f270177a1e72e9.tar.gz
dtc-73ae43ea44a40c2ac00dd94523f270177a1e72e9.tar.bz2
Allow nodes to be referenced by path at the top level.
When nodes are modified by merging device trees, nodes to be updated/merged can be specified by a label. Specifying nodes by full path (instead of label) doesn't quite work. This patch fixes that. Signed-off-by: John Bonesio <bones@secretlab.ca> Acked-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run_tests.sh2
-rw-r--r--tests/test_tree1_merge_path.dts41
2 files changed, 43 insertions, 0 deletions
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 77ce80d..a887254 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -305,6 +305,8 @@ dtc_tests () {
run_dtc_test -I dts -O dtb -o multilabel_merge.test.dtb multilabel_merge.dts
run_test references multilabel.test.dtb
run_test dtbs_equal_ordered multilabel.test.dtb multilabel_merge.test.dtb
+ run_dtc_test -I dts -O dtb -o dtc_tree1_merge_path.test.dtb test_tree1_merge_path.dts
+ tree1_tests dtc_tree1_merge_path.test.dtb test_tree1.dtb
# Check some checks
check_tests dup-nodename.dts duplicate_node_names
diff --git a/tests/test_tree1_merge_path.dts b/tests/test_tree1_merge_path.dts
new file mode 100644
index 0000000..d68713b
--- /dev/null
+++ b/tests/test_tree1_merge_path.dts
@@ -0,0 +1,41 @@
+/dts-v1/;
+
+/memreserve/ 0xdeadbeef00000000 0x100000;
+/memreserve/ 123456789 010000;
+
+/ {
+ compatible = "test_tree1";
+ prop-int = <0xdeadbeef>;
+ prop-str = "hello world";
+
+ subnode@1 {
+ compatible = "subnode1";
+ prop-int = [deadbeef];
+
+ subsubnode {
+ compatible = "subsubnode1", "subsubnode";
+ prop-int = <0xdeadbeef>;
+ };
+
+ ss1 {
+ };
+ };
+
+ subnode@2 {
+ linux,phandle = <0x2000>;
+ prop-int = <123456789>;
+
+ ssn0: subsubnode@0 {
+ phandle = <0x2001>;
+ prop-int = <0xbad>;
+ };
+
+ ss2 {
+ };
+ };
+};
+
+&{/subnode@2/subsubnode@0} {
+ compatible = "subsubnode2", "subsubnode";
+ prop-int = <0726746425>;
+};