summaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@nokia.com>2010-03-23 13:35:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-24 16:31:21 -0700
commit7198f3c9b13c7aa1e5d9f7ff74c0ea303174feff (patch)
tree506065ad0752685ec1ac0a164e294bd85cb9bbb9 /include/linux/mmc
parent3f8b5ee33293d43ca360771b535dfae8c57259dc (diff)
downloadop-kernel-dev-7198f3c9b13c7aa1e5d9f7ff74c0ea303174feff.zip
op-kernel-dev-7198f3c9b13c7aa1e5d9f7ff74c0ea303174feff.tar.gz
mmc: fix incorrect interpretation of card type bits
In the extended CSD register the CARD_TYPE is an 8-bit value of which the upper 6 bits were reserved in JEDEC specifications prior to version 4.4. In version 4.4 two of the reserved bits were designated for identifying support for the newly added High-Speed Dual Data Rate. Unfortunately the mmc_read_ext_csd() function required that the reserved bits be zero instead of ignoring them as it should. This patch makes mmc_read_ext_csd() ignore the CARD_TYPE bits that are reserved or not yet supported. It also stops the function jumping to the end as though an error occurred, when it is only warns that the CARD_TYPE bits (that it does interpret) are invalid. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.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>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/mmc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index c02c8db..8a49cbf 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -268,6 +268,7 @@ struct _mmc_csd {
#define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */
#define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */
+#define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */
#define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */
#define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */
OpenPOWER on IntegriCloud