summaryrefslogtreecommitdiff
path: root/include/libfdt.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-03-23 00:52:58 +0100
committerWolfgang Denk <wd@denx.de>2008-03-23 00:52:58 +0100
commit161efeb011ecaeb7e9a52dd56d88b94c25c5db1f (patch)
tree8a351c9921418fcaebdd8f2a0856d779b179cff4 /include/libfdt.h
parent6887cb6817dac9c6e8fb43b560c58b6a37926529 (diff)
parent01026a6e613e1cfe580122fb5350677025f896fa (diff)
downloadu-boot-imx-161efeb011ecaeb7e9a52dd56d88b94c25c5db1f.zip
u-boot-imx-161efeb011ecaeb7e9a52dd56d88b94c25c5db1f.tar.gz
u-boot-imx-161efeb011ecaeb7e9a52dd56d88b94c25c5db1f.tar.bz2
Merge branch 'master' of git://www.denx.de/git/u-boot-fdt
Diffstat (limited to 'include/libfdt.h')
-rw-r--r--include/libfdt.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/libfdt.h b/include/libfdt.h
index 6c05236..beeacb2 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 */
/**********************************************************************/
@@ -846,6 +852,32 @@ int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size);
int fdt_del_mem_rsv(void *fdt, int n);
/**
+ * fdt_set_name - change the name of a given node
+ * @fdt: pointer to the device tree blob
+ * @nodeoffset: structure block offset of a node
+ * @name: name to give the node
+ *
+ * fdt_set_name() replaces the name (including unit address, if any)
+ * of the given node with the given string. NOTE: this function can't
+ * efficiently check if the new name is unique amongst the given
+ * node's siblings; results are undefined if this function is invoked
+ * with a name equal to one of the given node's siblings.
+ *
+ * This function may insert or delete data from the blob, and will
+ * therefore change the offsets of some existing nodes.
+ *
+ * returns:
+ * 0, on success
+ * -FDT_ERR_NOSPACE, there is insufficient free space in the blob
+ * to contain the new name
+ * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
+ * -FDT_ERR_BADMAGIC,
+ * -FDT_ERR_BADVERSION,
+ * -FDT_ERR_BADSTATE, standard meanings
+ */
+int fdt_set_name(void *fdt, int nodeoffset, const char *name);
+
+/**
* fdt_setprop - create or change a property
* @fdt: pointer to the device tree blob
* @nodeoffset: offset of the node whose property to change