Commit c4f603f7233230879d91e9115b8f2730ec9be499

Authored by Lukas Auer
Committed by Andes
1 parent 50b4b80f59

fdtdec: make CONFIG_OF_PRIOR_STAGE available in SPL

The current preprocessor logic prevents CONFIG_OF_PRIOR_STAGE from being
used in U-Boot SPL. Change the logic to also make it available in U-Boot
SPL.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>

Showing 2 changed files with 3 additions and 5 deletions Side-by-side Diff

... ... @@ -54,7 +54,7 @@
54 54 #define SPL_BUILD 0
55 55 #endif
56 56  
57   -#if CONFIG_IS_ENABLED(OF_PRIOR_STAGE)
  57 +#ifdef CONFIG_OF_PRIOR_STAGE
58 58 extern phys_addr_t prior_stage_fdt_address;
59 59 #endif
60 60  
... ... @@ -1535,16 +1535,14 @@
1535 1535 puts("Failed to read control FDT\n");
1536 1536 return -1;
1537 1537 }
  1538 +# elif defined(CONFIG_OF_PRIOR_STAGE)
  1539 + gd->fdt_blob = (void *)prior_stage_fdt_address;
1538 1540 # endif
1539 1541 # ifndef CONFIG_SPL_BUILD
1540 1542 /* Allow the early environment to override the fdt address */
1541   -# if CONFIG_IS_ENABLED(OF_PRIOR_STAGE)
1542   - gd->fdt_blob = (void *)prior_stage_fdt_address;
1543   -# else
1544 1543 gd->fdt_blob = map_sysmem
1545 1544 (env_get_ulong("fdtcontroladdr", 16,
1546 1545 (unsigned long)map_to_sysmem(gd->fdt_blob)), 0);
1547   -# endif
1548 1546 # endif
1549 1547  
1550 1548 # if CONFIG_IS_ENABLED(MULTI_DTB_FIT)