diff options
author | Aries Lee <arieslee@jmicron.com> | 2010-12-15 02:14:24 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-01-08 23:52:09 -0500 |
commit | 22113efd00491310da802f3b1a9a66cfcf415fac (patch) | |
tree | 1faf6e99a591f9b6856bab6c8318eeeacb076051 /include/linux/mmc | |
parent | e6f29a8dc1602e170daf955233891a9130573a55 (diff) |
mmc: Test bus-width for old MMC devices
Some old MMC devices fail with the 4/8 bits the driver tries to use
exclusively. This patch adds a test for the given bus setup and falls
back to the lower bit mode (until 1-bit mode) when the test fails.
[Major rework and refactoring by tiwai]
[Quirk addition and many fixes by prakity]
Signed-off-by: Aries Lee <arieslee@jmicron.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Philip Rakity <prakity@marvell.com>
Tested-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/host.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 3a85e73a38a9..bcb793ec7374 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -172,6 +172,7 @@ struct mmc_host { | |||
172 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ | 172 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ |
173 | /* DDR mode at 1.2V */ | 173 | /* DDR mode at 1.2V */ |
174 | #define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */ | 174 | #define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */ |
175 | #define MMC_CAP_BUS_WIDTH_TEST (1 << 14) /* CMD14/CMD19 bus width ok */ | ||
175 | 176 | ||
176 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 177 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
177 | 178 | ||
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 956fbd877692..612301f85d14 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -40,7 +40,9 @@ | |||
40 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ | 40 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ |
41 | #define MMC_STOP_TRANSMISSION 12 /* ac R1b */ | 41 | #define MMC_STOP_TRANSMISSION 12 /* ac R1b */ |
42 | #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */ | 42 | #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */ |
43 | #define MMC_BUS_TEST_R 14 /* adtc R1 */ | ||
43 | #define MMC_GO_INACTIVE_STATE 15 /* ac [31:16] RCA */ | 44 | #define MMC_GO_INACTIVE_STATE 15 /* ac [31:16] RCA */ |
45 | #define MMC_BUS_TEST_W 19 /* adtc R1 */ | ||
44 | #define MMC_SPI_READ_OCR 58 /* spi spi_R3 */ | 46 | #define MMC_SPI_READ_OCR 58 /* spi spi_R3 */ |
45 | #define MMC_SPI_CRC_ON_OFF 59 /* spi [0:0] flag spi_R1 */ | 47 | #define MMC_SPI_CRC_ON_OFF 59 /* spi [0:0] flag spi_R1 */ |
46 | 48 | ||