diff options
author | Ying Zhang <b40530@freescale.com> | 2013-09-06 17:30:58 +0800 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2013-10-16 16:13:12 -0700 |
commit | 62c6ef336d8d315e3aed1fc7d4235db210e1c75d (patch) | |
tree | 62f66f331ab8c868bb1ed1a0cf8781cb1009260f /board/freescale/p1_p2_rdb_pc/spl.c | |
parent | d34e56241de299e12639ea39ef65c537cf0ded18 (diff) |
powerpc: p1_p2_rdb_pc: add TPL for p1_p2_rdb_pc nand boot
Enable TPL for p1_p2_rdb_pc nand boot.
Signed-off-by: Ying Zhang <b40530@freescale.com>
Diffstat (limited to 'board/freescale/p1_p2_rdb_pc/spl.c')
-rw-r--r-- | board/freescale/p1_p2_rdb_pc/spl.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index 07fab46349..9bb071692d 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -83,12 +83,21 @@ void board_init_r(gd_t *gd, ulong dest_addr) mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR, CONFIG_SPL_RELOC_MALLOC_SIZE); +#ifndef CONFIG_SPL_NAND_BOOT env_init(); +#endif #ifdef CONFIG_SPL_MMC_BOOT mmc_initialize(bd); #endif /* relocate environment function pointers etc. */ +#ifdef CONFIG_SPL_NAND_BOOT + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); + gd->env_addr = (ulong)(CONFIG_ENV_ADDR); + gd->env_valid = 1; +#else env_relocate(); +#endif #ifdef CONFIG_SYS_I2C i2c_init_all(); @@ -97,11 +106,17 @@ void board_init_r(gd_t *gd, ulong dest_addr) #endif gd->ram_size = initdram(0); +#ifdef CONFIG_SPL_NAND_BOOT + puts("Tertiary program loader running in sram..."); +#else puts("Second program loader running in sram...\n"); +#endif #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) spi_boot(); +#elif defined(CONFIG_SPL_NAND_BOOT) + nand_boot(); #endif } |