Commit 5f9070a4 authored by Etienne Carriere's avatar Etienne Carriere Committed by Tom Rini
Browse files

optee: copy FDT OP-TEE related nodes before generic FDT changes

Move call to optee_copy_fdt_nodes() introduced by commit 6ccb05ea
before generic changes in kernel FDT so that platform specific changes
are not overridden by the changes made by this function.

Fixes: 6ccb05ea

 ("image: fdt: copy possible optee nodes to a loaded devicetree")
Signed-off-by: default avatarEtienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@st.com>
parent 421ebb71
...@@ -557,6 +557,14 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, ...@@ -557,6 +557,14 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
printf("ERROR: arch-specific fdt fixup failed\n"); printf("ERROR: arch-specific fdt fixup failed\n");
goto err; 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 */ /* Update ethernet nodes */
fdt_fixup_ethernet(blob); fdt_fixup_ethernet(blob);
if (IMAGE_OF_BOARD_SETUP) { if (IMAGE_OF_BOARD_SETUP) {
...@@ -576,13 +584,6 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, ...@@ -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 */ /* Delete the old LMB reservation */
if (lmb) if (lmb)
lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob, lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment