summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/Kconfig6
-rw-r--r--common/spl/spl_mmc.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 282d246ea3..7862a0128c 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -325,6 +325,12 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
Address on the MMC to load U-Boot from, when the MMC is being used
in raw mode. Units: MMC sectors (1 sector = 512 bytes).
+config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
+ int "Number of the eMMC boot partition to use"
+ default 1
+ help
+ eMMC boot partition number to use when the eMMC in raw mode.
+
config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
bool "MMC Raw mode: by partition"
help
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index fa19aa76b3..c5cae97099 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -355,6 +355,9 @@ int spl_mmc_load(struct spl_image_info *spl_image,
err = -EINVAL;
switch (boot_mode) {
case MMCSD_MODE_EMMCBOOT:
+#ifdef CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
+ part = CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION;
+#else
/*
* We need to check what the partition is configured to.
* 1 and 2 match up to boot0 / boot1 and 7 is user data
@@ -364,6 +367,7 @@ int spl_mmc_load(struct spl_image_info *spl_image,
if (part == 7)
part = 0;
+#endif
if (CONFIG_IS_ENABLED(MMC_TINY))
err = mmc_switch_part(mmc, part);