aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/omap_hsmmc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 12:33:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 12:33:42 -0400
commit00ebb6382b8d9c7c15b5f8ad230670d8161d38dd (patch)
tree23591394b83776953aaf0b382d4c7b09e0ca1e34 /drivers/mmc/host/omap_hsmmc.c
parent11cc21f5f5575b9abd14d53a6055ccbf72b67573 (diff)
parent536ac998f6076a0ae423b1046b85d7690e8b7107 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (66 commits) mmc: add new sdhci-pxa driver for Marvell SoCs mmc: make number of mmcblk minors configurable mmc_spi: Recover from CRC errors for r/w operation over SPI. mmc: sdhci-pltfm: add -pltfm driver for imx35/51 mmc: sdhci-of-esdhc: factor out common stuff mmc: sdhci_pltfm: pass more data on custom init call mmc: sdhci: introduce get_ro private write-protect hook mmc: sdhci-pltfm: move .h file into appropriate subdir mmc: sdhci-pltfm: Add structure for host-specific data mmc: fix cb710 kconfig dependency warning mmc: cb710: remove debugging printk (info duplicated from mmc-core) mmc: cb710: clear irq handler on init() error path mmc: cb710: remove unnecessary msleep() mmc: cb710: implement get_cd() callback mmc: cb710: partially demystify clock selection mmc: add a file to debugfs for changing host clock at runtime mmc: sdhci: allow for eMMC 74 clock generation by controller mmc: sdhci: highspeed: check for mmc as well as sd cards mmc: sdhci: Add Moorestown device support mmc: sdhci: Intel Medfield support ...
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 4693e62145a6..e865032a52eb 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -250,9 +250,9 @@ static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
250 mmc_slot(host).before_set_reg(dev, slot, power_on, vdd); 250 mmc_slot(host).before_set_reg(dev, slot, power_on, vdd);
251 251
252 if (power_on) 252 if (power_on)
253 ret = mmc_regulator_set_ocr(host->vcc, vdd); 253 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd);
254 else 254 else
255 ret = mmc_regulator_set_ocr(host->vcc, 0); 255 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, 0);
256 256
257 if (mmc_slot(host).after_set_reg) 257 if (mmc_slot(host).after_set_reg)
258 mmc_slot(host).after_set_reg(dev, slot, power_on, vdd); 258 mmc_slot(host).after_set_reg(dev, slot, power_on, vdd);
@@ -291,18 +291,23 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
291 * chips/cards need an interface voltage rail too. 291 * chips/cards need an interface voltage rail too.
292 */ 292 */
293 if (power_on) { 293 if (power_on) {
294 ret = mmc_regulator_set_ocr(host->vcc, vdd); 294 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd);
295 /* Enable interface voltage rail, if needed */ 295 /* Enable interface voltage rail, if needed */
296 if (ret == 0 && host->vcc_aux) { 296 if (ret == 0 && host->vcc_aux) {
297 ret = regulator_enable(host->vcc_aux); 297 ret = regulator_enable(host->vcc_aux);
298 if (ret < 0) 298 if (ret < 0)
299 ret = mmc_regulator_set_ocr(host->vcc, 0); 299 ret = mmc_regulator_set_ocr(host->mmc,
300 host->vcc, 0);
300 } 301 }
301 } else { 302 } else {
303 /* Shut down the rail */
302 if (host->vcc_aux) 304 if (host->vcc_aux)
303 ret = regulator_disable(host->vcc_aux); 305 ret = regulator_disable(host->vcc_aux);
304 if (ret == 0) 306 if (!ret) {
305 ret = mmc_regulator_set_ocr(host->vcc, 0); 307 /* Then proceed to shut down the local regulator */
308 ret = mmc_regulator_set_ocr(host->mmc,
309 host->vcc, 0);
310 }
306 } 311 }
307 312
308 if (mmc_slot(host).after_set_reg) 313 if (mmc_slot(host).after_set_reg)
@@ -343,9 +348,9 @@ static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
343 if (cardsleep) { 348 if (cardsleep) {
344 /* VCC can be turned off if card is asleep */ 349 /* VCC can be turned off if card is asleep */
345 if (sleep) 350 if (sleep)
346 err = mmc_regulator_set_ocr(host->vcc, 0); 351 err = mmc_regulator_set_ocr(host->mmc, host->vcc, 0);
347 else 352 else
348 err = mmc_regulator_set_ocr(host->vcc, vdd); 353 err = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd);
349 } else 354 } else
350 err = regulator_set_mode(host->vcc, mode); 355 err = regulator_set_mode(host->vcc, mode);
351 if (err) 356 if (err)
@@ -2130,8 +2135,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
2130 2135
2131 /* Since we do only SG emulation, we can have as many segs 2136 /* Since we do only SG emulation, we can have as many segs
2132 * as we want. */ 2137 * as we want. */
2133 mmc->max_phys_segs = 1024; 2138 mmc->max_segs = 1024;
2134 mmc->max_hw_segs = 1024;
2135 2139
2136 mmc->max_blk_size = 512; /* Block Length at max can be 1024 */ 2140 mmc->max_blk_size = 512; /* Block Length at max can be 1024 */
2137 mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */ 2141 mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */