[PATCH 1/1] fdt: fix condition for devicetree from bloblist
Tom Rini
trini at konsulko.com
Mon Jun 1 18:15:13 CEST 2026
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 <alexander.stein at ew.tq-group.com>
> ---
> 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/20260519162225.770071-1-trini@konsulko.com/
and see if your problem is fixed there too? Thanks.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260601/79f29213/attachment.sig>
More information about the U-Boot
mailing list