Hello,

On 11/10/25 9:35 PM, Marco Felsch wrote:
> Remove the /secure-chosen/stdout-path property if requested by the board
> code.
> 
> Signed-off-by: Marco Felsch <[email protected]>

Ah, I see now what pbl_disable_secure_chosen_stdout() is about.

I have a question though: Doesn't the way it's structured now mean that
the code for fdt_remove_secure_chosen_stdout() is always included, even
if ultimately unused? I don't want boards that are completely
uninterested in this to pull in libfdt. Did you check?

Cheers,
Ahmad


> ---
>  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");
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |


Reply via email to