diff options
author | Colin Cross <ccross@android.com> | 2011-09-19 22:44:04 -0700 |
---|---|---|
committer | Praneeth Bajjuri <praneeth@ti.com> | 2011-09-19 22:44:17 -0700 |
commit | 52c079d4f5891856212603b0dd85d4efb3bfc515 (patch) | |
tree | 6bea99c7e3c763a81a8d96e578ea74ec3445f3df | |
parent | ca68129d670d58561c43c13a6cdb4a17ae12690f (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.
Change-Id: I845fe85fedd3e67e342b44bb918ce32adfa05cad
Signed-off-by: Colin Cross <ccross@android.com>
-rw-r--r-- | drivers/mmc/core/mmc.c | 7 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 1 |
2 files changed, 1 insertions, 7 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 47eac7149c5..5700b1cbdfe 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -278,13 +278,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_SIZE_MULTI] * 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) { diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 9e082f76b81..5a794cb503e 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h @@ -293,7 +293,6 @@ struct _mmc_csd { #define EXT_CSD_SEC_ERASE_MULT 230 /* RO */ #define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */ #define EXT_CSD_TRIM_MULT 232 /* RO */ -#define EXT_CSD_BOOT_SIZE_MULTI 226 /* RO */ /* * EXT_CSD field definitions |