aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc/protocol.h
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2006-10-29 10:14:19 +0100
committerPierre Ossman <drzeus@drzeus.cx>2006-12-01 18:22:44 +0100
commite45a1bd20fa5b920901879e85cdf5eda21f78d7c (patch)
treed767af9df9ae4b39e9bd3675b1644fa5eaccd325 /include/linux/mmc/protocol.h
parentbce40a36de574376f41f1ff3c4d212a7da2a3c90 (diff)
downloadlinux-e45a1bd20fa5b920901879e85cdf5eda21f78d7c.tar.gz
mmc: Add support for mmc v4 wide-bus modes
This change adds support for the mmc4 4-bit wide-bus mode. The mmc4 spec defines 8-bit and 4-bit transfer modes. As we do not support any 8-bit hardware, this patch only adds support for the 4-bit mode, but it can easily be built upon when the time comes. The 4-bit mode is electrically compatible with SD's 4-bit mode but the procedure for turning it on is different. This patch implements only the essential parts of the procedure as defined by the spec. Two additional steps are recommended but not compulsory. I am documenting them here so that there's a record. 1) A bus-test mechanism is implemented using dedicated mmc commands which allow for testing the functionality of the data bus at the electrical level. This is pretty paranoid and they way the commands work is not compatible with the mmc subsystem (they don't set valid CRC values). 2) MMC v4 cards can indicate they would like to draw more than the default amount of current in wide-bus modes. We currently will never switch the card into a higher draw mode. Supposedly, allowing the card to draw more current will let it perform better, but the specs seem to indicate that the card will function correctly without the mode change. Empirical testing supports this interpretation. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux/mmc/protocol.h')
-rw-r--r--include/linux/mmc/protocol.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h
index 311b6547f561f..45c51fd85786d 100644
--- a/include/linux/mmc/protocol.h
+++ b/include/linux/mmc/protocol.h
@@ -256,6 +256,7 @@ struct _mmc_csd {
* EXT_CSD fields
*/
+#define EXT_CSD_BUS_WIDTH 183 /* R/W */
#define EXT_CSD_HS_TIMING 185 /* R/W */
#define EXT_CSD_CARD_TYPE 196 /* RO */
@@ -270,6 +271,10 @@ 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_BUS_WIDTH_1 0 /* Card is in 1 bit mode */
+#define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */
+#define EXT_CSD_BUS_WIDTH_8 2 /* Card is in 8 bit mode */
+
/*
* MMC_SWITCH access modes
*/