Remove the /secure-chosen/stdout-path property if requested by the board
code.

Signed-off-by: Marco Felsch <[email protected]>
---
 arch/arm/mach-imx/atf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/mach-imx/atf.c b/arch/arm/mach-imx/atf.c
index 
baaf0bcc843a72021f97591348e9d165a34d0640..e56aecb9fd814a9324c086b39be3b8790929ba3a
 100644
--- a/arch/arm/mach-imx/atf.c
+++ b/arch/arm/mach-imx/atf.c
@@ -142,6 +142,14 @@ imx8m_tfa_start_bl31(const void *tfa_bin, size_t tfa_size, 
void *tfa_dest,
                                pr_warn("Failed to fixup FDT memory node, 
continue without\n");
                                fdt = NULL;
                        }
+
+                       if (pbl_disable_secure_chosen_stdout()) {
+                               ret = fdt_remove_secure_chosen_stdout(fdt);
+                               if (ret) {
+                                       pr_warn("Failed to disable 
secure-chosen, continue without FDT\n");
+                                       fdt = NULL;
+                               }
+                       }
                } else {
                        if (ret == -ENOTSUPP)
                                pr_debug("PBL_EARLY_FDT_LOAD disabled, continue 
without\n");

-- 
2.47.3


Reply via email to