summaryrefslogtreecommitdiff
path: root/include/libfdt.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-02-12 00:58:31 +1100
committerMarian Balakowicz <m8@semihalf.com>2008-02-29 16:00:31 +0100
commitd1cc52879c8966507dad9fb575481e6d3985e64e (patch)
tree520740ce4303de372edfae1e204feea698fee233 /include/libfdt.h
parent8cf30809a82902a471866d2f07725ce3b8a22291 (diff)
downloadu-boot-imx-d1cc52879c8966507dad9fb575481e6d3985e64e.zip
u-boot-imx-d1cc52879c8966507dad9fb575481e6d3985e64e.tar.gz
u-boot-imx-d1cc52879c8966507dad9fb575481e6d3985e64e.tar.bz2
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 6c05236..3a64d0b 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 */
/**********************************************************************/