diff options
Diffstat (limited to 'common/spl/spl_mmc.c')
-rw-r--r-- | common/spl/spl_mmc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 0cd355cd46..fb51fd5a98 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -157,6 +157,21 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, disk_partition_t info; int err; +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE + int type_part; + /* Only support MBR so DOS_ENTRY_NUMBERS */ + for (type_part = 1; type_part <= DOS_ENTRY_NUMBERS; type_part++) { + err = part_get_info(mmc_get_blk_desc(mmc), type_part, &info); + if (err) + continue; + if (info.sys_ind == + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE) { + partition = type_part; + break; + } + } +#endif + err = part_get_info(mmc_get_blk_desc(mmc), partition, &info); if (err) { #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT |