summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2019-09-23 10:18:40 +0800
committerStefano Babic <[email protected]>2019-10-08 16:36:36 +0200
commit30ecc9c323ec2db72a709da7d3f3f70373aa52ee (patch)
treeaf2da2bc87337335cfe221ef357b597d73c64692 /common
parent9b15ce91939d6469dda92eb297b44fa87572629a (diff)
spl: mmc: introduce spl_mmc_get_uboot_raw_sector
Introduce a weak function spl_mmc_get_uboot_raw_sector, then platform could have their own implementation. Signed-off-by: Peng Fan <[email protected]> Cc: Simon Goldschmidt <[email protected]> Cc: Tien Fong Chee <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Andreas Dannenberg <[email protected]> Cc: Alex Kiernan <[email protected]> Cc: Stefan Roese <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Miquel Raynal <[email protected]> Cc: Michal Simek <[email protected]>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_mmc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 6c6eaf4ec87..ebc566081ad 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -313,6 +313,15 @@ int spl_boot_partition(const u32 boot_device)
}
#endif
+unsigned long __weak spl_mmc_get_uboot_raw_sector(struct mmc *mmc)
+{
+#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
+ return CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR;
+#else
+ return 0;
+#endif
+}
+
int spl_mmc_load(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev,
const char *filename,
@@ -340,6 +349,8 @@ int spl_mmc_load(struct spl_image_info *spl_image,
}
}
+ raw_sect = spl_mmc_get_uboot_raw_sector(mmc);
+
boot_mode = spl_boot_mode(bootdev->boot_device);
err = -EINVAL;
switch (boot_mode) {