summaryrefslogtreecommitdiffstats
path: root/include/libfdt.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-02-12 11:58:31 +1100
committerGerald Van Baren <vanbaren@cideas.com>2008-03-18 21:03:45 -0400
commitae0b5908de3b9855f8931bc9b32c9fc4962df5a9 (patch)
tree95f9df10a186b5c4c62d311f8df8d0830b06e7d4 /include/libfdt.h
parent9eaeb07a7185d852c7aa10735ecd4e9edf24fb5d (diff)
downloadblackbird-obmc-uboot-ae0b5908de3b9855f8931bc9b32c9fc4962df5a9.tar.gz
blackbird-obmc-uboot-ae0b5908de3b9855f8931bc9b32c9fc4962df5a9.zip
libfdt: Add and use a node iteration helper function.
This patch adds an fdt_next_node() function which can be used to iterate through nodes of the tree while keeping track of depth. This function is used to simplify the iteration code in a lot of other functions, and is also exported for use by library users. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/libfdt.h')
-rw-r--r--include/libfdt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libfdt.h b/include/libfdt.h
index f634a9c8df..beeacb2e07 100644
--- a/include/libfdt.h
+++ b/include/libfdt.h
@@ -131,6 +131,12 @@ static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);
/**********************************************************************/
+/* Traversal functions */
+/**********************************************************************/
+
+int fdt_next_node(const void *fdt, int offset, int *depth);
+
+/**********************************************************************/
/* General functions */
/**********************************************************************/
OpenPOWER on IntegriCloud