aboutsummaryrefslogtreecommitdiff
path: root/include/fdt_support.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-11-12 08:27:46 -0700
committerTom Rini <trini@konsulko.com>2023-12-13 18:39:05 -0500
commit451c1ab6b07b677ef10d36af5c63a7d764ea8ba2 (patch)
tree86b50963bc7322b030b4ef5f1ca65ede4babe3df /include/fdt_support.h
parent9578dd856a72b0412fa65480d8e3c76a52a6cba1 (diff)
downloadu-boot-451c1ab6b07b677ef10d36af5c63a7d764ea8ba2.zip
u-boot-451c1ab6b07b677ef10d36af5c63a7d764ea8ba2.tar.gz
u-boot-451c1ab6b07b677ef10d36af5c63a7d764ea8ba2.tar.bz2
fdt: Improve the comment for fdt_shrink_to_minimum()
Add a bit more detail about what this function does. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r--include/fdt_support.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index feda0d9..0601f5f 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -232,13 +232,23 @@ int ft_system_setup(void *blob, struct bd_info *bd);
void set_working_fdt_addr(ulong addr);
/**
- * shrink down the given blob to minimum size + some extrasize if required
+ * fdt_shrink_to_minimum() - shrink FDT while allowing for some margin
+ *
+ * Shrink down the given blob to 'minimum' size + some extrasize.
+ *
+ * The new size is enough to hold the existing contents plus @extrasize bytes,
+ * plus 5 memory reservations. Also, the end of the FDT is aligned to a 4KB
+ * boundary, so it might end up up to 4KB larger than needed.
+ *
+ * If there is an existing memory reservation for @blob in the FDT, it is
+ * updated for the new size.
*
* @param blob FDT blob to update
* @param extrasize additional bytes needed
* Return: 0 if ok, or -FDT_ERR_... on error
*/
int fdt_shrink_to_minimum(void *blob, uint extrasize);
+
int fdt_increase_size(void *fdt, int add_len);
int fdt_delete_disabled_nodes(void *blob);