diff options
author | Peter Bigot <pab@pabigot.com> | 2014-09-03 12:22:43 -0500 |
---|---|---|
committer | Pantelis Antoniou <panto@antoniou-consulting.com> | 2014-10-03 17:26:50 +0300 |
commit | 19345d7c9483b84578da5206b3c604b534121d88 (patch) | |
tree | 895a493d6009bfe9d8b5b2bbd48efd8b40169bd6 | |
parent | 6dc93e7087ccac1acb6910ac8838d9e90c602fe4 (diff) | |
download | u-boot-imx-19345d7c9483b84578da5206b3c604b534121d88.zip u-boot-imx-19345d7c9483b84578da5206b3c604b534121d88.tar.gz u-boot-imx-19345d7c9483b84578da5206b3c604b534121d88.tar.bz2 |
env_mmc: correct fini partition to match init partition
The code to set the MMC partition uses an weak function to obtain the
correct partition number. Use that instead of the compile-time default
when deciding whether it needs to switch back.
Fixes: 6e7b7df4df43574 ("env_mmc: support env partition setup in runtime")
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Acked-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
-rw-r--r-- | common/env_mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/env_mmc.c b/common/env_mmc.c index a7621a8..14648e3 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -113,7 +113,7 @@ static void fini_mmc_for_env(struct mmc *mmc) #ifdef CONFIG_SPL_BUILD dev = 0; #endif - if (CONFIG_SYS_MMC_ENV_PART != mmc->part_num) + if (mmc_get_env_part(mmc) != mmc->part_num) mmc_switch_part(dev, mmc->part_num); #endif } |