aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorSaugata Das <saugata.das@linaro.org>2011-12-21 02:39:17 -0500
committerChris Ball <cjb@laptop.org>2012-03-25 19:33:44 -0400
commit4265900e0be653f5b78baf2816857ef57cf1332f (patch)
tree156dc60c8f5b24aa0c8be7d18759faae6ecff5f7 /drivers/mmc/core
parente2a0883e4071237d09b604a342c28b96b44a04b3 (diff)
mmc: MMC-4.5 Data Tag Support
MMC-4.5 data tag feature will be used to store the file system meta-data in the tagged region of eMMC. This will improve the write and subsequent read transfer time for the meta data. Signed-off-by: Saugata Das <saugata.das@linaro.org> Tested-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/mmc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 2b9ed1401dc4..6defddd795f6 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -519,6 +519,20 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
519 ext_csd[EXT_CSD_CACHE_SIZE + 1] << 8 | 519 ext_csd[EXT_CSD_CACHE_SIZE + 1] << 8 |
520 ext_csd[EXT_CSD_CACHE_SIZE + 2] << 16 | 520 ext_csd[EXT_CSD_CACHE_SIZE + 2] << 16 |
521 ext_csd[EXT_CSD_CACHE_SIZE + 3] << 24; 521 ext_csd[EXT_CSD_CACHE_SIZE + 3] << 24;
522
523 if (ext_csd[EXT_CSD_DATA_SECTOR_SIZE] == 1)
524 card->ext_csd.data_sector_size = 4096;
525 else
526 card->ext_csd.data_sector_size = 512;
527
528 if ((ext_csd[EXT_CSD_DATA_TAG_SUPPORT] & 1) &&
529 (ext_csd[EXT_CSD_TAG_UNIT_SIZE] <= 8)) {
530 card->ext_csd.data_tag_unit_size =
531 ((unsigned int) 1 << ext_csd[EXT_CSD_TAG_UNIT_SIZE]) *
532 (card->ext_csd.data_sector_size);
533 } else {
534 card->ext_csd.data_tag_unit_size = 0;
535 }
522 } 536 }
523 537
524out: 538out: