1
0
Fork 0

MLK-19219-1 spl: Add function to get u-boot raw sector

Add a weak function spl_mmc_get_uboot_raw_sector to get u-boot raw sector.
At default it returns CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR. Users
can overwrite it to return customized offset.

Signed-off-by: Ye Li <ye.li@nxp.com>
zero-sugar
Ye Li 2018-08-14 03:52:16 -07:00
parent 2bc872282b
commit 9f2ffbe414
1 changed files with 8 additions and 1 deletions

View File

@ -293,6 +293,13 @@ u32 __weak spl_boot_mode(const u32 boot_device)
#endif
}
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
unsigned long __weak spl_mmc_get_uboot_raw_sector(struct mmc *mmc)
{
return CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR;
}
#endif
int spl_mmc_load_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
{
@ -355,7 +362,7 @@ int spl_mmc_load_image(struct spl_image_info *spl_image,
#endif
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
err = mmc_load_image_raw_sector(spl_image, mmc,
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
spl_mmc_get_uboot_raw_sector(mmc));
if (!err)
return err;
#endif