[PATCH] fdt: Update fdtcontroladdr if fdt_blob changes
Andreas Gnau
andreas.gnau at iopsys.eu
Fri Nov 1 14:38:33 CET 2024
When a different FDT blob is chosen via fdtdec_resetup /
board_fit_config_name_match, update the fdtcontroladdr environment
variable accordingly. This fixes an issue where fdtcontroladdr would
still point to the previously used FDT blob.
Signed-off-by: Andreas Gnau <andreas.gnau at iopsys.eu>
---
lib/fdtdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index b06559880296..e3534b647556 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1759,6 +1759,8 @@ int fdtdec_resetup(int *rescan)
*rescan = 1;
gd->fdt_blob = fdt_blob;
+ env_set_hex("fdtcontroladdr",
+ (unsigned long)map_to_sysmem(gd->fdt_blob));
return fdtdec_prepare_fdt(fdt_blob);
}
--
2.47.0
More information about the U-Boot
mailing list