fdtdec: encapsulate dtb_dt_embedded() within

Patch keeps the access to dtb_dt_embedded() within fdtdec API,
by means of new API function introduction. This new function is a
common place for updating appropriate global_data fields for
OF_EMBED case.

  Also, the consequence of the patch is movement of '___dtb_dt_*begin'
symbols' declaration from header file, because nobody used symbols
outside the lib/fdtdec.c.

Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com>
Suggested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 623f5cf517)
This commit is contained in:
Evgeny Bachinin
2024-12-11 01:39:57 +03:00
committed by Simon Glass
parent e094e2095e
commit 94e9d64ffc
3 changed files with 33 additions and 21 deletions

View File

@@ -159,11 +159,11 @@ static int initr_reloc_global_data(void)
/*
* For CONFIG_OF_EMBED case the FDT is embedded into ELF, available by
* __dtb_dt_begin. After U-boot ELF self-relocation to RAM top address
* __dtb_dt_begin. After U-Boot ELF self-relocation to RAM top address
* it is worth to update fdt_blob in global_data
*/
if (IS_ENABLED(CONFIG_OF_EMBED))
gd->fdt_blob = dtb_dt_embedded();
fdtdec_setup_embed();
#ifdef CONFIG_EFI_LOADER
/*