
Tidy up the function comment. Shorten the names of the return arguments since it is clear that they relate to devicetree. Signed-off-by: Simon Glass <sjg@chromium.org> --- boot/image-fdt.c | 13 ++++++------- include/image.h | 24 +++++++++--------------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/boot/image-fdt.c b/boot/image-fdt.c index 3d5b6f9e2dc..fc5a3d8ff4a 100644 --- a/boot/image-fdt.c +++ b/boot/image-fdt.c @@ -439,14 +439,13 @@ static int select_fdt(struct bootm_headers *images, const char *select, u8 arch, } int boot_get_fdt(void *buf, const char *select, uint arch, - struct bootm_headers *images, char **of_flat_tree, - ulong *of_size) + struct bootm_headers *images, char **startp, ulong *sizep) { char *fdt_blob = NULL; ulong fdt_addr; - *of_flat_tree = NULL; - *of_size = 0; + *startp = NULL; + *sizep = 0; if (select || genimg_has_config(images)) { int ret; @@ -529,10 +528,10 @@ int boot_get_fdt(void *buf, const char *select, uint arch, goto no_fdt; } - *of_flat_tree = fdt_blob; - *of_size = fdt_totalsize(fdt_blob); + *startp = fdt_blob; + *sizep = fdt_totalsize(fdt_blob); debug(" of_flat_tree at 0x%08lx size 0x%08lx\n", - (ulong)*of_flat_tree, *of_size); + (ulong)*startp, *sizep); return 0; diff --git a/include/image.h b/include/image.h index 673c30f25e9..d38320f69cb 100644 --- a/include/image.h +++ b/include/image.h @@ -887,29 +887,23 @@ int fit_get_node_from_config(struct bootm_headers *images, /** * boot_get_fdt() - locate FDT devicetree to use for booting * + * Finds a valid flat device tree image if possible, from these sources: + * - multicomponent kernel/ramdisk/FDT image + * - commandline provided address of decicated FDT image + * * @buf: Pointer to image * @select: FDT to select (this is normally argv[2] of the bootm command) * @arch: architecture (IH_ARCH_...) * @images: pointer to the bootm images structure - * @of_flat_tree: pointer to a char* variable, will hold fdt start address - * @of_size: pointer to a ulong variable, will hold fdt length - * - * boot_get_fdt() is responsible for finding a valid flat device tree image. - * Currently supported are the following FDT sources: - * - multicomponent kernel/ramdisk/FDT image, - * - commandline provided address of decicated FDT image. - * - * Return: - * 0, if fdt image was found and valid, or skipped - * of_flat_tree and of_size are set to fdt start address and length if - * fdt image is found and valid + * @startp: returns the fdt start address, if 0 if none + * @sizep: returns the fdt length, or 0 if none * + * Return: 0 if fdt image was found and valid, or skipped; * 1, if fdt image is found but corrupted - * of_flat_tree and of_size are set to 0 if no fdt exists */ int boot_get_fdt(void *buf, const char *select, uint arch, - struct bootm_headers *images, char **of_flat_tree, - ulong *of_size); + struct bootm_headers *images, char **startp, + ulong *sizep); void boot_fdt_add_mem_rsv_regions(void *fdt_blob); int boot_relocate_fdt(char **of_flat_tree, ulong *of_size); -- 2.43.0