aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2007-03-16 22:39:00 -0400
committerPierre Ossman <drzeus@drzeus.cx>2007-05-01 08:14:50 -0400
commit55556da01284af8c2174b786b3eca8e11301b656 (patch)
tree579e0dbd68021daee1ff0c5b400d9cdf71c6faf8 /include/linux
parent4be34c99a2f3aa90fa42e62c0918f07afb8a645b (diff)
MMC: Fix handling of low-voltage cards
Fix handling of low voltage MMC cards. The latest MMC and SD specs both agree that support for low-voltage operations is indicated by bit 7 in the OCR. The MMC spec states that the low voltage range is 1.65-1.95V while the SD spec leaves the actual voltage range undefined - meaning that there is still no such thing as a low voltage SD card. However, an old Sandisk spec implied that bits 7.0 represented voltages below 2.0V in 1V or 0.5V increments, and the code was accordingly written with that expectation. This confusion meant that host drivers attempting to support the typical low voltage (1.8V) would set the wrong bits in the host OCR mask (usually bits 5 and/or 6) resulting in the the low voltage mode never being used. This change corrects the low voltage range and adds sanity checks on the reserved bits (0-6) and for SD cards that claim to support low-voltage operations. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmc/host.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 5a66d8a2bf17..b1350dfd3e91 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -65,14 +65,7 @@ struct mmc_host {
65 unsigned int f_max; 65 unsigned int f_max;
66 u32 ocr_avail; 66 u32 ocr_avail;
67 67
68#define MMC_VDD_145_150 0x00000001 /* VDD voltage 1.45 - 1.50 */ 68#define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */
69#define MMC_VDD_150_155 0x00000002 /* VDD voltage 1.50 - 1.55 */
70#define MMC_VDD_155_160 0x00000004 /* VDD voltage 1.55 - 1.60 */
71#define MMC_VDD_160_165 0x00000008 /* VDD voltage 1.60 - 1.65 */
72#define MMC_VDD_165_170 0x00000010 /* VDD voltage 1.65 - 1.70 */
73#define MMC_VDD_17_18 0x00000020 /* VDD voltage 1.7 - 1.8 */
74#define MMC_VDD_18_19 0x00000040 /* VDD voltage 1.8 - 1.9 */
75#define MMC_VDD_19_20 0x00000080 /* VDD voltage 1.9 - 2.0 */
76#define MMC_VDD_20_21 0x00000100 /* VDD voltage 2.0 ~ 2.1 */ 69#define MMC_VDD_20_21 0x00000100 /* VDD voltage 2.0 ~ 2.1 */
77#define MMC_VDD_21_22 0x00000200 /* VDD voltage 2.1 ~ 2.2 */ 70#define MMC_VDD_21_22 0x00000200 /* VDD voltage 2.1 ~ 2.2 */
78#define MMC_VDD_22_23 0x00000400 /* VDD voltage 2.2 ~ 2.3 */ 71#define MMC_VDD_22_23 0x00000400 /* VDD voltage 2.2 ~ 2.3 */