summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-12-01 02:06:33 +0100
committerJaehoon Chung <jh80.chung@samsung.com>2016-12-01 13:51:57 +0900
commitb5b838f1a726e9ab7eea505740e8169b55e90ed6 (patch)
tree30c1d1b44a48d97813e9595f66850d89363992a9 /common/spl
parentce9eca9438d69306441060e7ac90e45d47882f34 (diff)
downloadu-boot-imx-b5b838f1a726e9ab7eea505740e8169b55e90ed6.zip
u-boot-imx-b5b838f1a726e9ab7eea505740e8169b55e90ed6.tar.gz
u-boot-imx-b5b838f1a726e9ab7eea505740e8169b55e90ed6.tar.bz2
mmc: Tinification of the mmc code
Add new configuration option CONFIG_MMC_TINY which strips away all memory allocation within the MMC code and code for handling multiple cards. This allows extremely space-constrained SPL code use the MMC framework. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl_mmc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index a3d6b36..7dfcd0b 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -306,7 +306,11 @@ static int spl_mmc_load_image(struct spl_image_info *spl_image,
if (part == 7)
part = 0;
- err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part);
+ if (CONFIG_IS_ENABLED(MMC_TINY))
+ err = mmc_switch_part(mmc, part);
+ else
+ err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part);
+
if (err) {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
puts("spl: mmc partition switch failed\n");