summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPhilip Rakity <prakity@marvell.com>2011-03-19 14:10:33 -0400
committerChris Ball <cjb@laptop.org>2011-05-24 20:59:13 -0400
commit41e2a4893566ced3c46af15df5b727326881e47d (patch)
tree62263d47bf1f034857e8138095af724aa61c53bb /drivers/mmc
parent7c21738efd0b5e8c2a9ac2440e7ffbf432d6f239 (diff)
mmc: Ensure linux starts in eMMC user partition
uBoot sometimes leaves eMMC pointing to the private boot partition. Ensure we always start looking at the user partition. Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Bruce Clemens <bpclemens@marvell.com> Signed-off-by: Mark F. Brown <markb@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/mmc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 772d0d0a541b..5c611a6e0080 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -288,6 +288,7 @@ static int mmc_read_ext_csd(struct mmc_card *card)
if (card->ext_csd.rev >= 3) {
u8 sa_shift = ext_csd[EXT_CSD_S_A_TIMEOUT];
+ card->ext_csd.bootconfig = ext_csd[EXT_CSD_BOOT_CONFIG];
/* Sleep / awake timeout in 100ns units */
if (sa_shift > 0 && sa_shift <= 0x17)
@@ -568,6 +569,15 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
}
/*
+ * Ensure eMMC user default partition is enabled
+ */
+ if (card->ext_csd.bootconfig & 0x7) {
+ card->ext_csd.bootconfig &= ~0x7;
+ mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BOOT_CONFIG,
+ card->ext_csd.bootconfig);
+ }
+
+ /*
* Activate high speed (if supported)
*/
if ((card->ext_csd.hs_max_dtr != 0) &&