aboutsummaryrefslogtreecommitdiff
path: root/include/fdt_support.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-11-12 08:27:48 -0700
committerTom Rini <trini@konsulko.com>2023-12-13 18:39:05 -0500
commitf2cbe6e43e18e9b65190c53cb4b92dd6699cb38b (patch)
treebc83abefd3ad548ccd8bd2620098eca4692e4811 /include/fdt_support.h
parent83cd8fb13cdda29e4f99a1d7c8c6ba2c7d755c12 (diff)
downloadu-boot-f2cbe6e43e18e9b65190c53cb4b92dd6699cb38b.zip
u-boot-f2cbe6e43e18e9b65190c53cb4b92dd6699cb38b.tar.gz
u-boot-f2cbe6e43e18e9b65190c53cb4b92dd6699cb38b.tar.bz2
boot: Move adding initrd earlier in image_setup_libfdt()
This may as well happen before the general event is emitted, so move it. This will allow us to use the livetree for the event part, but the flattree for the earlier part. 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 0601f5f..25600d6 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -55,7 +55,17 @@ int fdt_chosen(void *fdt);
/**
* Add initrd information to the FDT before booting the OS.
*
- * @param fdt FDT address in memory
+ * Adds linux,initrd-start and linux,initrd-end properties to the /chosen node,
+ * creating it if necessary.
+ *
+ * A memory reservation for the ramdisk is added to the FDT, or an existing one
+ * (with matching @initrd_start) updated.
+ *
+ * If @initrd_start == @initrd_end this function does nothing and returns 0.
+ *
+ * @fdt: Pointer to FDT in memory
+ * @initrd_start: Start of ramdisk
+ * @initrd_end: End of ramdisk
* Return: 0 if ok, or -FDT_ERR_... on error
*/
int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end);