lib: optee: migration optee_copy_fdt_nodes for OF_LIVE support
PATCH 1/1 lib: optee: migration optee_copy_fdt_nodes for OF_LIVE support
The optee_copy_fdt_nodes is only used to copy op-tee nodes of U-Boot device tree (from gd->fdt_blob when OF_LIVE is not activated) to external device tree but it is not compatible with OF_LIVE.
This patch migrates all used function fdt_ functions to read node on old_blob to ofnode functions, compatible with OF_LIVE and remove this parameter "old_blob".
The generated "device tree" is checked on stm32mp platform with OF_LIVE activated.
---
common/image-fdt.c | 2 +- include/tee/optee.h | 4 ++-- lib/optee/optee.c | 45 ++++++++++++++++++--------------------------- 3 files changed, 21 insertions(+), 30 deletions(-)
common/image-fdt.c +1 -1
@@ -561,7 +561,7 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, goto err; } - fdt_ret =optee_copy_fdt_nodes (gd->fdt_blob, blob); + fdt_ret =optee_copy_fdt_nodes (blob);if (fdt_ret) {printf ("ERROR: transfer of optee nodes to new fdt failed: %s\n" ,fdt_strerror (fdt_ret));
include/tee/optee.h +2 -2
@@ -71,9 +71,9 @@ static inline int optee_verify_bootm_image(unsigned long image_addr,#endif #if defined(CONFIG_OPTEE ) && defined(CONFIG_OF_LIBFDT ) -int optee_copy_fdt_nodes (const void *old_blob,void *new_blob); +int optee_copy_fdt_nodes (void *new_blob);#else -static inline int optee_copy_fdt_nodes (const void *old_blob,void *new_blob) +static inline int optee_copy_fdt_nodes (void *new_blob) {return 0 ; }
lib/optee/optee.c +18 -27
102 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 1/1 lib: optee: migration optee_copy_fdt_nodes for OF_LIVE support
Quoted 4 lines · Patrick Delaunay
The
optee_copy_fdt_nodesis only used to copy op-tee nodes of U-Boot device tree (fromgd->fdt_blobwhenOF_LIVEis not activated) to external device tree but it is not compatible withOF_LIVE.
Quoted 8 lines
This patch migrates all used function
fdt_functions to read node onold_blobto ofnode functions, compatible withOF_LIVEand remove this parameter "old_blob".The generated "device tree" is checked on stm32mp platform with
OF_LIVEactivated.Signed-off-by Patrick Delaunay <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210413/31b75762/attachment.sig>