summaryrefslogtreecommitdiff
path: root/include/libfdt.h
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2016-10-17 22:50:18 +0200
committersjg <sjg@chromium.org>2016-10-23 12:08:48 -0700
commit610db7058f1d9ed668aef7692f8f90f05e0923f8 (patch)
treeb140849a63d8decb62b3b985579dfe1c92cfa67a /include/libfdt.h
parent3431b392ad50ff37fa3d6e7715c6a99c74d692dc (diff)
libfdt: Sync overlay with upstream
Now that the overlay code has been merge upstream, update our copy to what's been merged, since a significant number of issues have been fixed during the merge process. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/libfdt.h')
-rw-r--r--include/libfdt.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/include/libfdt.h b/include/libfdt.h
index 8746790a25..e2bc2e00c1 100644
--- a/include/libfdt.h
+++ b/include/libfdt.h
@@ -79,8 +79,10 @@
* (e.g. missing a leading / for a function which requires an
* absolute path) */
#define FDT_ERR_BADPHANDLE 6
- /* FDT_ERR_BADPHANDLE: Function was passed an invalid phandle
- * value. phandle values of 0 and -1 are not permitted. */
+ /* FDT_ERR_BADPHANDLE: Function was passed an invalid phandle.
+ * This can be caused either by an invalid phandle property
+ * length, or the phandle value was either 0 or -1, which are
+ * not permitted. */
#define FDT_ERR_BADSTATE 7
/* FDT_ERR_BADSTATE: Function was passed an incomplete device
* tree created by the sequential-write functions, which is
@@ -126,12 +128,21 @@
* value. For example: a property expected to contain a string list
* is not NUL-terminated within the length of its value. */
-#define FDT_ERR_TOODEEP 16
+#define FDT_ERR_BADOVERLAY 16
+ /* FDT_ERR_BADOVERLAY: The device tree overlay, while
+ * correctly structured, cannot be applied due to some
+ * unexpected or missing value, property or node. */
+
+#define FDT_ERR_NOPHANDLES 17
+ /* FDT_ERR_NOPHANDLES: The device tree doesn't have any
+ * phandle available anymore without causing an overflow */
+
+#define FDT_ERR_TOODEEP 18
/* FDT_ERR_TOODEEP: The depth of a node has exceeded the internal
* libfdt limit. This can happen if you have more than
* FDT_MAX_DEPTH nested nodes. */
-#define FDT_ERR_MAX 16
+#define FDT_ERR_MAX 18
/**********************************************************************/
/* Low-level functions (you probably don't need these) */
@@ -1789,8 +1800,9 @@ int fdt_del_node(void *fdt, int nodeoffset);
* -FDT_ERR_NOSPACE, there's not enough space in the base device tree
* -FDT_ERR_NOTFOUND, the overlay points to some inexistant nodes or
* properties in the base DT
- * -FDT_ERR_BADPHANDLE, the phandles in the overlay do not have the right
- * magic
+ * -FDT_ERR_BADPHANDLE,
+ * -FDT_ERR_BADOVERLAY,
+ * -FDT_ERR_NOPHANDLES,
* -FDT_ERR_INTERNAL,
* -FDT_ERR_BADLAYOUT,
* -FDT_ERR_BADMAGIC,