aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorInderpal Singh <inderpal.singh@linaro.org>2012-12-07 10:34:42 +0530
committerTushar Behera <tushar.behera@linaro.org>2013-02-05 10:39:12 +0530
commit5b93b27bbcc74c5c13ec015206a5adb364f108dc (patch)
tree76f86f5acd85d51646563aef4d7ebb0f4e0b893f /drivers
parent9eb4a7766b57a7d26772787b40c2738c3d335dd4 (diff)
downloadu-boot-linaro-stable-5b93b27bbcc74c5c13ec015206a5adb364f108dc.tar.gz
COMMAND: MMC: Extend mmc command to make emmc bootable
Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mmc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 5ffd8c59e..1d2fa7319 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -669,6 +669,20 @@ int mmc_switch_part(int dev_num, unsigned int part_num)
| (part_num & PART_ACCESS_MASK));
}
+int mmc_part_bootenable(int dev_num, unsigned int part_num)
+{
+ struct mmc *mmc = find_mmc_device(dev_num);
+
+ if (!mmc)
+ return -1;
+
+ return mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_PART_CONF,
+ (mmc->part_config & ~(BOOT_PART_ENABLE_MASK | PART_ACCESS_MASK))
+ | (part_num & PART_ACCESS_MASK)
+ | ((part_num << 3) & BOOT_PART_ENABLE_MASK)
+ | BOOT_ACK);
+}
+
int mmc_getcd(struct mmc *mmc)
{
int cd;