summaryrefslogtreecommitdiff
path: root/include/fdt_support.h
diff options
context:
space:
mode:
authorHannes Schmelzer <hannes.schmelzer@br-automation.com>2016-09-20 16:10:43 (GMT)
committerSimon Glass <sjg@chromium.org>2016-10-13 19:54:10 (GMT)
commitef47683646516002694729986d19713e49b903e3 (patch)
treebcc15aaf0aba47b52029e4b9595dabfb5e5ed4b1 /include/fdt_support.h
parentc69f6d04ec66433f2360490a5cd0263c83aab18f (diff)
downloadu-boot-fsl-qoriq-ef47683646516002694729986d19713e49b903e3.tar.xz
cmd/fdt: add possibilty to have 'extrasize' on fdt resize
Sometimes devicetree nodes and or properties are added out of the u-boot console, maybe through some script or manual interaction. The devicetree as loaded or embedded is quite small, so the devicetree has to be resized to take up those new nodes/properties. In original the devicetree was only extended by effective 4 * add_mem_rsv. With this commit we can add an argument to the "fdt resize" command, which takes the extrasize to be added. Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r--include/fdt_support.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 8f40231..506bc5a 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -167,7 +167,15 @@ void ft_pci_setup(void *blob, bd_t *bd);
int ft_system_setup(void *blob, bd_t *bd);
void set_working_fdt_addr(ulong addr);
-int fdt_shrink_to_minimum(void *blob);
+
+/**
+ * shrink down the given blob to minimum size + some extrasize if required
+ *
+ * @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_fixup_nor_flash_size(void *blob);