diff options
author | Pali Rohár <pali@kernel.org> | 2022-04-03 00:24:27 +0200 |
---|---|---|
committer | Priyanka Jain <priyanka.jain@nxp.com> | 2022-04-26 17:18:39 +0530 |
commit | 03edf23376cd63142624bca8a58477e0c99f4cb0 (patch) | |
tree | f716b3b0334fe62e327532037e8ef197266ba0ee | |
parent | 78cdaf405311682281d9c5f58dc0b4455e72da61 (diff) | |
download | u-boot-03edf23376cd63142624bca8a58477e0c99f4cb0.zip u-boot-03edf23376cd63142624bca8a58477e0c99f4cb0.tar.gz u-boot-03edf23376cd63142624bca8a58477e0c99f4cb0.tar.bz2 |
board: freescale: p1_p2_rdb_pc: Allow to compile it without env support
When env support is disabled then usage of env_init() or env_relocate()
generates linker errors. So do not compile env_init() or env_relocate()
in SPL code when env support is disabled in SPL.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
-rw-r--r-- | board/freescale/p1_p2_rdb_pc/spl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index f855f3a..22156f2 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -83,12 +83,15 @@ void board_init_r(gd_t *gd, ulong dest_addr) CONFIG_SPL_RELOC_MALLOC_SIZE); gd->flags |= GD_FLG_FULL_MALLOC_INIT; +#ifdef CONFIG_SPL_ENV_SUPPORT #ifndef CONFIG_SPL_NAND_BOOT env_init(); #endif +#endif #ifdef CONFIG_SPL_MMC_BOOT mmc_initialize(bd); #endif +#ifdef CONFIG_SPL_ENV_SUPPORT /* relocate environment function pointers etc. */ #ifdef CONFIG_SPL_NAND_BOOT nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, @@ -98,6 +101,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #else env_relocate(); #endif +#endif #if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) i2c_init_all(); |