On Mon, Jun 01, 2026 at 10:26:30AM +0200, Alexander Stein wrote:

> On boards without TPL, but SPL enabled, xpl_prev_phase() will return never
> return PHASE_TPL. This the condition is always true. This is a problem
> for system which use an SDRAM bloblist location and initialize the SDRAM
> in SPL. Adjust the condition to take this config into account.
> 
> Signed-off-by: Alexander Stein <[email protected]>
> ---
> There is also another possibility for the check. I'm not sure which one
> is better or preferred.
> 
> --- a/lib/fdtdec.c
> +++ b/lib/fdtdec.c
> @@ -1829,7 +1829,7 @@ int fdtdec_setup(void)
>          * not whether this phase creates one.
>          */
>         if (CONFIG_IS_ENABLED(BLOBLIST) &&
> -           (xpl_prev_phase() != PHASE_TPL ||
> +           (xpl_prev_phase() != PHASE_TPL &&
>              IS_ENABLED(CONFIG_TPL_BLOBLIST))) {
>                 ret = bloblist_maybe_init();
>                 if (!ret) {
> 
>  lib/fdtdec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
> index c67b6e8c133..3f31f9c2aeb 100644
> --- a/lib/fdtdec.c
> +++ b/lib/fdtdec.c
> @@ -1829,8 +1829,8 @@ int fdtdec_setup(void)
>        * not whether this phase creates one.
>        */
>       if (CONFIG_IS_ENABLED(BLOBLIST) &&
> -         (xpl_prev_phase() != PHASE_TPL ||
> -          IS_ENABLED(CONFIG_TPL_BLOBLIST))) {
> +         !xpl_is_first_phase() &&
> +         (IS_ENABLED(CONFIG_TPL_BLOBLIST) || 
> IS_ENABLED(CONFIG_SPL_BLOBLIST))) {
>               ret = bloblist_maybe_init();
>               if (!ret) {
>                       gd->fdt_blob = bloblist_find(BLOBLISTT_CONTROL_FDT, 0);

Can you please test the series at
https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
and see if your problem is fixed there too? Thanks.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to