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/sw_tree1.c | |
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/sw_tree1.c')
-rw-r--r-- | tests/sw_tree1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/sw_tree1.c b/tests/sw_tree1.c index 68551c3..215d515 100644 --- a/tests/sw_tree1.c +++ b/tests/sw_tree1.c @@ -69,8 +69,10 @@ int main(int argc, char *argv[]) CHECK(fdt_end_node(fdt)); CHECK(fdt_begin_node(fdt, "subnode@2")); + CHECK(fdt_property_typed(fdt, "linux,phandle", cpu_to_fdt32(PHANDLE_1))); CHECK(fdt_property_typed(fdt, "prop-int", TEST_VALUE_2)); CHECK(fdt_begin_node(fdt, "subsubnode@0")); + CHECK(fdt_property_typed(fdt, "linux,phandle", cpu_to_fdt32(PHANDLE_2))); CHECK(fdt_property(fdt, "compatible", "subsubnode2\0subsubnode", 23)); CHECK(fdt_property_typed(fdt, "prop-int", TEST_VALUE_2)); |