diff options
author | Colin Cross <ccross@android.com> | 2011-12-13 01:22:14 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-12-26 16:42:12 +0800 |
commit | 74f7cc68aad4147b94658183cfd6e029fd16dacc (patch) | |
tree | 3cf02e2c515c5b87cba3eadfaa620344fa6501e2 /drivers | |
parent | 31d80f8fd1c0652173f7f683a4156e11060ae389 (diff) |
Revert "mmc: subtract boot sectors from disk size for eMMC 4.3+ devices"
This reverts commit f0b0e4bec1e89014f3dcef4da8bcf95428cc771c.
The reverted commit incorrectly calculates the size of eMMC
devices in some (all?) cases.
This revert may cause problems in cases where the bootloader was
bug-compatible and puts a GPT partition at the incorrect end of
the eMMC device.
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/mmc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 99799e07b1c..d240427c124 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -281,13 +281,8 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) ext_csd[EXT_CSD_SEC_CNT + 3] << 24; /* Cards with density > 2GiB are sector addressed */ - if (card->ext_csd.sectors > (2u * 1024 * 1024 * 1024) / 512) { - unsigned boot_sectors; - /* size is in 256K chunks, i.e. 512 sectors each */ - boot_sectors = ext_csd[EXT_CSD_BOOT_MULT] * 512; - card->ext_csd.sectors -= boot_sectors; + if (card->ext_csd.sectors > (2u * 1024 * 1024 * 1024) / 512) mmc_card_set_blockaddr(card); - } } card->ext_csd.raw_card_type = ext_csd[EXT_CSD_CARD_TYPE]; switch (ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_MASK) { |