mmc: only set blockaddressed for > 2GiB cards
PATCH 39/177 mmc: only set blockaddressed for > 2GiB cards
From: Hanumath Prasad <[email protected]>
A non-zero value of SEC_COUNT does not indicate that the card is sector addressed. According to the MMC specification, cards with a density greater than 2GiB are sector addressed.
Acked-by Linus Walleij <[email protected]>
Signed-off-by Hanumath Prasad <[email protected]>
Signed-off-by Rabin Vincent <[email protected]>
Cc <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/mmc/core/mmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/core/mmc.c renamed from drivers/mmc/core/mmc.c~mmc-only-set-blockaddressed-for-2gib-cards +3 -1
@@ -234,7 +234,9 @@ static int mmc_read_ext_csd(struct mmc_c ext_csd[EXT_CSD_SEC_CNT +1 ] <<8 | ext_csd[EXT_CSD_SEC_CNT +2 ] <<16 | ext_csd[EXT_CSD_SEC_CNT +3 ] <<24 ; -if (card->ext_csd.sectors) + +/* Cards with density > 2GiB are sector addressed */ +if (card->ext_csd.sectors > (2u *1024 *1024 *1024 ) /512 )mmc_card_set_blockaddr (card); }
_