diff options
author | Saugata Das <saugata.das@linaro.org> | 2011-12-21 13:09:17 +0530 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-03-25 19:33:44 -0400 |
commit | 4265900e0be653f5b78baf2816857ef57cf1332f (patch) | |
tree | 156dc60c8f5b24aa0c8be7d18759faae6ecff5f7 /drivers/mmc/core/mmc.c | |
parent | e2a0883e4071237d09b604a342c28b96b44a04b3 (diff) | |
download | blackbird-op-linux-4265900e0be653f5b78baf2816857ef57cf1332f.tar.gz blackbird-op-linux-4265900e0be653f5b78baf2816857ef57cf1332f.zip |
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/mmc.c')
-rw-r--r-- | drivers/mmc/core/mmc.c | 14 |
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) ext_csd[EXT_CSD_CACHE_SIZE + 1] << 8 | ext_csd[EXT_CSD_CACHE_SIZE + 2] << 16 | ext_csd[EXT_CSD_CACHE_SIZE + 3] << 24; + + if (ext_csd[EXT_CSD_DATA_SECTOR_SIZE] == 1) + card->ext_csd.data_sector_size = 4096; + else + card->ext_csd.data_sector_size = 512; + + if ((ext_csd[EXT_CSD_DATA_TAG_SUPPORT] & 1) && + (ext_csd[EXT_CSD_TAG_UNIT_SIZE] <= 8)) { + card->ext_csd.data_tag_unit_size = + ((unsigned int) 1 << ext_csd[EXT_CSD_TAG_UNIT_SIZE]) * + (card->ext_csd.data_sector_size); + } else { + card->ext_csd.data_tag_unit_size = 0; + } } out: |