aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorFaiz Abbas <faiz_abbas@ti.com>2020-02-26 13:44:35 +0530
committerPeng Fan <peng.fan@nxp.com>2020-03-09 08:33:16 +0800
commitcf0082559698765a96f96cb3811db6a91c02ca82 (patch)
tree906390d6edd026bbdd2133653ec71f43859983fe /common
parenta85121392015e30bd12302ea2986b7ca662d198d (diff)
downloadu-boot-cf0082559698765a96f96cb3811db6a91c02ca82.zip
u-boot-cf0082559698765a96f96cb3811db6a91c02ca82.tar.gz
u-boot-cf0082559698765a96f96cb3811db6a91c02ca82.tar.bz2
spl: mmc: Fix spl_mmc_get_uboot_raw_sector() implementation
The call to spl_mmc_get_uboot_raw_sector() completely ignores and overwrites the raw_sect value passed from the caller of spl_mmc_load(). Fix this by passing raw_sect to the function and returning the same value in the default case. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_mmc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 3e6a17c..a2ea363 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -317,13 +317,10 @@ int spl_boot_partition(const u32 boot_device)
}
#endif
-unsigned long __weak spl_mmc_get_uboot_raw_sector(struct mmc *mmc)
+unsigned long __weak spl_mmc_get_uboot_raw_sector(struct mmc *mmc,
+ unsigned long raw_sect)
{
-#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
- return CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR;
-#else
- return 0;
-#endif
+ return raw_sect;
}
int spl_mmc_load(struct spl_image_info *spl_image,
@@ -392,7 +389,7 @@ int spl_mmc_load(struct spl_image_info *spl_image,
return err;
}
- raw_sect = spl_mmc_get_uboot_raw_sector(mmc);
+ raw_sect = spl_mmc_get_uboot_raw_sector(mmc, raw_sect);
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
err = mmc_load_image_raw_partition(spl_image, mmc, raw_part,