diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-12-08 04:04:30 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-01-08 22:48:04 -0500 |
commit | 8f230f454fe04ba326ffaead3a6b88dcf44eaf4b (patch) | |
tree | 9f5c43b48aa84131f7b94b44e4d500e0ec271ba0 /include/linux/mmc | |
parent | 150ee73d1b35936aafc5fd3b39a7291b1f66de07 (diff) |
mmc: Add support for JMicron 388 SD/MMC controller
JMicron 388 SD/MMC combo controller supports the 1.8V low-voltage for
SD, but MMC doesn't work with the low-voltage, resulting in an error
at probing.
This patch adds the support for multiple voltage mask per device type,
so that SD works with 1.8V while MMC forces 3.3V. Here new ocr_avail_*
fields for each device are introduced, so that the actual OCR mask is
switched dynamically.
Also, the restriction of low-voltage in core/sd.c is removed when the
bit is allowed explicitly via ocr_avail_sd mask.
This patch was rewritten from scratch based on Aries' original code.
Signed-off-by: Aries Lee <arieslee@jmicron.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/host.h | 3 | ||||
-rw-r--r-- | include/linux/mmc/sdhci.h | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 381c77fd4dca..4a9d9d2589c7 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -131,6 +131,9 @@ struct mmc_host { | |||
131 | unsigned int f_max; | 131 | unsigned int f_max; |
132 | unsigned int f_init; | 132 | unsigned int f_init; |
133 | u32 ocr_avail; | 133 | u32 ocr_avail; |
134 | u32 ocr_avail_sdio; /* SDIO-specific OCR */ | ||
135 | u32 ocr_avail_sd; /* SD-specific OCR */ | ||
136 | u32 ocr_avail_mmc; /* MMC-specific OCR */ | ||
134 | struct notifier_block pm_notify; | 137 | struct notifier_block pm_notify; |
135 | 138 | ||
136 | #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */ | 139 | #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */ |
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 1fdc673f2396..0d953f513d81 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
@@ -139,6 +139,10 @@ struct sdhci_host { | |||
139 | 139 | ||
140 | unsigned int caps; /* Alternative capabilities */ | 140 | unsigned int caps; /* Alternative capabilities */ |
141 | 141 | ||
142 | unsigned int ocr_avail_sdio; /* OCR bit masks */ | ||
143 | unsigned int ocr_avail_sd; | ||
144 | unsigned int ocr_avail_mmc; | ||
145 | |||
142 | unsigned long private[0] ____cacheline_aligned; | 146 | unsigned long private[0] ____cacheline_aligned; |
143 | }; | 147 | }; |
144 | #endif /* __SDHCI_H */ | 148 | #endif /* __SDHCI_H */ |