aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/mmc.c11
-rw-r--r--drivers/mmc/core/sd.c18
-rw-r--r--drivers/mmc/host/sdhci.c5
3 files changed, 31 insertions, 3 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index c528017d6128..c2e120b11bef 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -323,6 +323,17 @@ int mmc_attach_mmc(struct mmc_host *host, u32 ocr)
323 323
324 mmc_attach_bus(host, &mmc_ops); 324 mmc_attach_bus(host, &mmc_ops);
325 325
326 /*
327 * Sanity check the voltages that the card claims to
328 * support.
329 */
330 if (ocr & 0x7F) {
331 printk(KERN_WARNING "%s: card claims to support voltages "
332 "below the defined range. These will be ignored.\n",
333 mmc_hostname(host));
334 ocr &= ~0x7F;
335 }
336
326 host->ocr = mmc_select_voltage(host, ocr); 337 host->ocr = mmc_select_voltage(host, ocr);
327 338
328 /* 339 /*
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 6c6beb48f3a8..fb18b301502e 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -297,6 +297,24 @@ int mmc_attach_sd(struct mmc_host *host, u32 ocr)
297 297
298 mmc_attach_bus(host, &mmc_sd_ops); 298 mmc_attach_bus(host, &mmc_sd_ops);
299 299
300 /*
301 * Sanity check the voltages that the card claims to
302 * support.
303 */
304 if (ocr & 0x7F) {
305 printk(KERN_WARNING "%s: card claims to support voltages "
306 "below the defined range. These will be ignored.\n",
307 mmc_hostname(host));
308 ocr &= ~0x7F;
309 }
310
311 if (ocr & MMC_VDD_165_195) {
312 printk(KERN_WARNING "%s: SD card claims to support the "
313 "incompletely defined 'low voltage range'. This "
314 "will be ignored.\n", mmc_hostname(host));
315 ocr &= ~MMC_VDD_165_195;
316 }
317
300 host->ocr = mmc_select_voltage(host, ocr); 318 host->ocr = mmc_select_voltage(host, ocr);
301 319
302 /* 320 /*
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index a57f6a3d48d3..ff5bf73cdd25 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -659,8 +659,7 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
659 pwr = SDHCI_POWER_ON; 659 pwr = SDHCI_POWER_ON;
660 660
661 switch (1 << power) { 661 switch (1 << power) {
662 case MMC_VDD_17_18: 662 case MMC_VDD_165_195:
663 case MMC_VDD_18_19:
664 pwr |= SDHCI_POWER_180; 663 pwr |= SDHCI_POWER_180;
665 break; 664 break;
666 case MMC_VDD_29_30: 665 case MMC_VDD_29_30:
@@ -1280,7 +1279,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
1280 if (caps & SDHCI_CAN_VDD_300) 1279 if (caps & SDHCI_CAN_VDD_300)
1281 mmc->ocr_avail |= MMC_VDD_29_30|MMC_VDD_30_31; 1280 mmc->ocr_avail |= MMC_VDD_29_30|MMC_VDD_30_31;
1282 if (caps & SDHCI_CAN_VDD_180) 1281 if (caps & SDHCI_CAN_VDD_180)
1283 mmc->ocr_avail |= MMC_VDD_17_18|MMC_VDD_18_19; 1282 mmc->ocr_avail |= MMC_VDD_165_195;
1284 1283
1285 if (mmc->ocr_avail == 0) { 1284 if (mmc->ocr_avail == 0) {
1286 printk(KERN_ERR "%s: Hardware doesn't report any " 1285 printk(KERN_ERR "%s: Hardware doesn't report any "