summaryrefslogtreecommitdiffstats
path: root/include/mmc.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-06-11 15:14:01 -0600
committerAndy Fleming <afleming@freescale.com>2013-06-13 16:52:19 -0500
commitf866a46d6ee86335f60c542e294ec2c01d689eba (patch)
treebf0687968802541782242d034ec0b4d03a3bba6e /include/mmc.h
parent06e4ae5f8059caac5597e0cfcad5e2e45838fadb (diff)
downloadblackbird-obmc-uboot-f866a46d6ee86335f60c542e294ec2c01d689eba.tar.gz
blackbird-obmc-uboot-f866a46d6ee86335f60c542e294ec2c01d689eba.zip
mmc: report capacity for the selected partition
Enhance the MMC core to calculate the size of each MMC partition, and update mmc->capacity whenever a partition is selected. This causes: mmc dev 0 1 ; mmcinfo ... to report the size of the currently selected partition, rather than always reporting the size of the user partition. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 566db59ac9..ea198d87b7 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -158,7 +158,9 @@
/*
* EXT_CSD fields
*/
+#define EXT_CSD_GP_SIZE_MULT 143 /* R/W */
#define EXT_CSD_PARTITIONING_SUPPORT 160 /* RO */
+#define EXT_CSD_RPMB_MULT 168 /* RO */
#define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */
#define EXT_CSD_PART_CONF 179 /* R/W */
#define EXT_CSD_BUS_WIDTH 183 /* R/W */
@@ -166,6 +168,7 @@
#define EXT_CSD_REV 192 /* RO */
#define EXT_CSD_CARD_TYPE 196 /* RO */
#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */
+#define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */
#define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */
#define EXT_CSD_BOOT_MULT 226 /* RO */
@@ -263,6 +266,10 @@ struct mmc {
uint write_bl_len;
uint erase_grp_size;
u64 capacity;
+ u64 capacity_user;
+ u64 capacity_boot;
+ u64 capacity_rpmb;
+ u64 capacity_gp[4];
block_dev_desc_t block_dev;
int (*send_cmd)(struct mmc *mmc,
struct mmc_cmd *cmd, struct mmc_data *data);
OpenPOWER on IntegriCloud