diff options
author | Ye Li <ye.li@nxp.com> | 2018-08-14 03:52:16 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2018-08-14 19:55:55 -0700 |
commit | 9f2ffbe41493fb9233d79e2933e337d7a6c2e20a (patch) | |
tree | bf4639bc4743e2e07ec5cc66e29dd334a66a49a8 /common | |
parent | 2bc872282b8ec6f90ef17013eb052f55f55659be (diff) |
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>
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/spl_mmc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index fd326f5828..4b9be0dc4d 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -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 |