summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Carriere <etienne.carriere@linaro.org>2020-06-05 09:22:54 +0200
committerTom Rini <trini@konsulko.com>2020-09-30 11:31:13 -0400
commit5f9070a4a48d2db1968b86a54e82724dbe2a6de6 (patch)
treed09278ef62029ab3116304675e4b1dfa1c0dafa3
parent421ebb713b8ede345a4aad0e95fbd6518ac6800d (diff)
downloadu-boot-WIP/30Sep2020.tar.gz
optee: copy FDT OP-TEE related nodes before generic FDT changesWIP/30Sep2020
Move call to optee_copy_fdt_nodes() introduced by commit 6ccb05eae01b before generic changes in kernel FDT so that platform specific changes are not overridden by the changes made by this function. Fixes: 6ccb05eae01b ("image: fdt: copy possible optee nodes to a loaded devicetree") Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
-rw-r--r--common/image-fdt.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c
index f13eefb061..3d6935ad40 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -557,6 +557,14 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
printf("ERROR: arch-specific fdt fixup failed\n");
goto err;
}
+
+ fdt_ret = optee_copy_fdt_nodes(gd->fdt_blob, blob);
+ if (fdt_ret) {
+ printf("ERROR: transfer of optee nodes to new fdt failed: %s\n",
+ fdt_strerror(fdt_ret));
+ goto err;
+ }
+
/* Update ethernet nodes */
fdt_fixup_ethernet(blob);
if (IMAGE_OF_BOARD_SETUP) {
@@ -576,13 +584,6 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
}
}
- fdt_ret = optee_copy_fdt_nodes(gd->fdt_blob, blob);
- if (fdt_ret) {
- printf("ERROR: transfer of optee nodes to new fdt failed: %s\n",
- fdt_strerror(fdt_ret));
- goto err;
- }
-
/* Delete the old LMB reservation */
if (lmb)
lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,