mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
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 <peng.fan@nxp.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: Marek Vasut <marex@denx.de> Cc: Andreas Dannenberg <dannenberg@ti.com> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Stefan Roese <sr@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
9b15ce9193
commit
30ecc9c323
1 changed files with 11 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue