summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAngelo Dureghello <angelo@sysam.it>2017-08-01 14:27:10 +0200
committerJaehoon Chung <jh80.chung@samsung.com>2017-08-17 17:00:11 +0900
commitbdb6099666933491ce393e52132e05604da91b1a (patch)
tree127076ebc6d7f6a4725d013e8f5d3967ec95016d /drivers/mmc
parente7881d85a94b2e35b12a163c3af671057e9ca5e8 (diff)
cmd: mmc: add mmc partconf read capability
This patch allows to show the EXT_CSD[179] partition_config register info, just by specifying the dev param: U-Boot> mmc partconf 0 EXT_CSD[179], PARTITION_CONFIG: BOOT_ACK: 0x0 BOOT_PARTITION_ENABLE: 0x0 PARTITION_ACCESS: 0x0 Signed-off-by: Angelo Dureghello <angelo@sysam.it> Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mmc_boot.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/mmc/mmc_boot.c b/drivers/mmc/mmc_boot.c
index ac6f56f157..6d77ce95e7 100644
--- a/drivers/mmc/mmc_boot.c
+++ b/drivers/mmc/mmc_boot.c
@@ -100,10 +100,19 @@ int mmc_set_boot_bus_width(struct mmc *mmc, u8 width, u8 reset, u8 mode)
*/
int mmc_set_part_conf(struct mmc *mmc, u8 ack, u8 part_num, u8 access)
{
- return mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_PART_CONF,
- EXT_CSD_BOOT_ACK(ack) |
- EXT_CSD_BOOT_PART_NUM(part_num) |
- EXT_CSD_PARTITION_ACCESS(access));
+ int ret;
+ u8 part_conf;
+
+ part_conf = EXT_CSD_BOOT_ACK(ack) |
+ EXT_CSD_BOOT_PART_NUM(part_num) |
+ EXT_CSD_PARTITION_ACCESS(access);
+
+ ret = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_PART_CONF,
+ part_conf);
+ if (!ret)
+ mmc->part_config = part_conf;
+
+ return ret;
}
/*