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>
(cherry picked from commit
9f2ffbe41493fb9233d79e2933e337d7a6c2e20a)
}
#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)
{
#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