diff options
author | Richard Zhu <r65037@freescale.com> | 2011-01-11 16:05:02 +0800 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2011-02-03 16:17:36 +0100 |
commit | 43f4411c2e23bbbd03835f6494dda720101fcdda (patch) | |
tree | 96aa0c3f56c96803b906da89d02230aa18757c08 /drivers/mmc | |
parent | 07a530f239aa36cea66a206c3fa6259f83f515e8 (diff) |
ENGR0000137838 SDHCI Some eMMC cards can't work well in our BSP
Pick up the patch from the community.
fc8a0985c2846292312556cba10b8a4182f55967
From: Hanumath Prasad <hanumath.prasad@stericsson.com>
Date: Tue, 10 Aug 2010 18:01:45 -0700
Subject: [PATCH] mmc: only set blockaddressed for >2GiB cards
A non-zero value of SEC_COUNT does not indicate that
the card is sector
addressed. According to the MMC specification, cards
with a densitygreater than 2GiB are sector
addressed.
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Hanumath Prasad <hanumath.prasad@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Richard Zhu <r65037@freescale.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/mmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 4a9e2ed15a04..95e13c2bbd59 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -222,7 +222,9 @@ static int mmc_read_ext_csd(struct mmc_card *card) 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); } |