diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-11-13 09:59:38 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-11-13 07:40:06 -0600 |
commit | 7346858f8139cb143269bbc728b77072074ae997 (patch) | |
tree | 442500075d6ea2f65032271a39b0a6052b1ee940 /tests/trees.S | |
parent | f6588bc32fd46d63da6058f37ce799ab948c3513 (diff) | |
download | dtc-7346858f8139cb143269bbc728b77072074ae997.zip dtc-7346858f8139cb143269bbc728b77072074ae997.tar.gz dtc-7346858f8139cb143269bbc728b77072074ae997.tar.bz2 |
libfdt: Add phandle related functions
This patch adds fdt_get_phandle() and fdt_node_offset_by_phandle()
functions to libfdt. fdt_get_phandle() will retreive the phandle
value of a given node, and fdt_node_offset_by_phandle() will locate a
node given a phandle.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/trees.S')
-rw-r--r-- | tests/trees.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/trees.S b/tests/trees.S index 42a9f7a..8ecae27 100644 --- a/tests/trees.S +++ b/tests/trees.S @@ -100,9 +100,11 @@ test_tree1_struct: END_NODE BEGIN_NODE("subnode@2") + PROP_INT(test_tree1, phandle, cell_to_fdt(PHANDLE_1)) PROP_INT(test_tree1, prop_int, TEST_VALUE_2) BEGIN_NODE("subsubnode@0") + PROP_INT(test_tree1, phandle, cell_to_fdt(PHANDLE_2)) PROP_STR(test_tree1, compatible, "subsubnode2\0subsubnode") PROP_INT(test_tree1, prop_int, TEST_VALUE_2) END_NODE @@ -116,6 +118,7 @@ test_tree1_strings: STRING(test_tree1, compatible, "compatible") STRING(test_tree1, prop_int, "prop-int") STRING(test_tree1, prop_str, "prop-str") + STRING(test_tree1, phandle, "linux,phandle") test_tree1_strings_end: test_tree1_end: |