From b5b838f1a726e9ab7eea505740e8169b55e90ed6 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 1 Dec 2016 02:06:33 +0100 Subject: 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 Signed-off-by: Marek Vasut Cc: Tom Rini Cc: Jaehoon Chung --- common/spl/spl_mmc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index a3d6b36cb4..7dfcd0ba2a 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"); -- cgit v1.2.3