* Can we support the voltage(s) of the card(s)?
*/
if (!host->ocr) {
+ printk(KERN_WARNING "%s: SD card needs voltage range "
+ "not supported by host (ocr=%08x).\n",
+ mmc_hostname(host), ocr);
err = -EINVAL;
goto err;
}
sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch");
if (host->carddetect) {
+#if 0 /* this code kills mmc host on Pandora! */
if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) {
/*
* Set the VDD back to 3V when the card is removed
if (omap_mmc_switch_opcond(host, vdd) != 0)
host->mmc->ios.vdd = vdd;
}
+#else
+ vdd = fls(host->mmc->ocr_avail) - 1;
+ host->mmc->ios.vdd = vdd;
+#endif
mmc_detect_change(host->mmc, (HZ * 200) / 1000);
} else {
OMAP_HSMMC_WRITE(host->base, SYSCTL,
"Switch operation failed\n");
}
}
+ else if (host->id == OMAP_MMC2_DEVID && ios->vdd == DUAL_VOLT_OCR_BIT &&
+ ios->power_mode != MMC_POWER_OFF &&
+ ios->power_mode != MMC_POWER_ON) {
+ /* see above comment.. */
+ omap_mmc_switch_opcond(host, ios->vdd);
+ }
if (ios->clock) {
dsor = OMAP_MMC_MASTER_CLOCK / ios->clock;