From: s-ghorai@ti.com (Sukumar Ghorai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] There is small problem to support the MMC card >4 GByte.
Date: Mon, 14 Sep 2009 14:28:01 +0530 [thread overview]
Message-ID: <mailman.10.1253362965.2253.linux-arm-kernel@lists.infradead.org> (raw)
EXT_CSD_REV could be any value <=3D2 and are valid as per MMCA Specificatio=
n. And it was checking for CSD_STRUCTURE filed of EXT_CSD register.
Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com>
---
drivers/mmc/core/mmc.c | 2 +-
include/linux/mmc/mmc.h | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 06084db..7b22a2e 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -216,7 +216,7 @@ static int mmc_read_ext_csd(struct mmc_card *card)
goto out;
}
- if (ext_csd_struct >=3D 2) {
+ if (ext_csd[EXT_CSD_STRUCT_REV] >=3D 2) {
card->ext_csd.sectors =3D
ext_csd[EXT_CSD_SEC_CNT + 0] << 0 |
ext_csd[EXT_CSD_SEC_CNT + 1] << 8 |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 14b81f3..c4e97a9 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -252,6 +252,7 @@ struct _mmc_csd {
#define EXT_CSD_BUS_WIDTH 183 /* R/W */
#define EXT_CSD_HS_TIMING 185 /* R/W */
#define EXT_CSD_CARD_TYPE 196 /* RO */
+#define EXT_CSD_STRUCT_REV 194 /* RO */
#define EXT_CSD_REV 192 /* RO */
#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */
--
1.5.4.7
Thanks Regards,
Ghorai
reply other threads:[~2009-09-14 8:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mailman.10.1253362965.2253.linux-arm-kernel@lists.infradead.org \
--to=s-ghorai@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).