aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/Kconfig2
-rw-r--r--drivers/mmc/host/omap_hsmmc.c36
2 files changed, 27 insertions, 11 deletions
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index afe8c6fa166a..54f91321749a 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -225,7 +225,7 @@ config MMC_OMAP
225 225
226config MMC_OMAP_HS 226config MMC_OMAP_HS
227 tristate "TI OMAP High Speed Multimedia Card Interface support" 227 tristate "TI OMAP High Speed Multimedia Card Interface support"
228 depends on ARCH_OMAP2430 || ARCH_OMAP3 || ARCH_OMAP4 228 depends on SOC_OMAP2430 || ARCH_OMAP3 || ARCH_OMAP4
229 help 229 help
230 This selects the TI OMAP High Speed Multimedia card Interface. 230 This selects the TI OMAP High Speed Multimedia card Interface.
231 If you have an OMAP2430 or OMAP3 board or OMAP4 board with a 231 If you have an OMAP2430 or OMAP3 board or OMAP4 board with a
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 078fdf11af03..158c0ee53b2c 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -118,7 +118,7 @@
118 118
119#define MMC_TIMEOUT_MS 20 119#define MMC_TIMEOUT_MS 20
120#define OMAP_MMC_MASTER_CLOCK 96000000 120#define OMAP_MMC_MASTER_CLOCK 96000000
121#define DRIVER_NAME "mmci-omap-hs" 121#define DRIVER_NAME "omap_hsmmc"
122 122
123/* Timeouts for entering power saving states on inactivity, msec */ 123/* Timeouts for entering power saving states on inactivity, msec */
124#define OMAP_MMC_DISABLED_TIMEOUT 100 124#define OMAP_MMC_DISABLED_TIMEOUT 100
@@ -260,7 +260,7 @@ static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
260 return ret; 260 return ret;
261} 261}
262 262
263static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on, 263static int omap_hsmmc_235_set_power(struct device *dev, int slot, int power_on,
264 int vdd) 264 int vdd)
265{ 265{
266 struct omap_hsmmc_host *host = 266 struct omap_hsmmc_host *host =
@@ -316,6 +316,12 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
316 return ret; 316 return ret;
317} 317}
318 318
319static int omap_hsmmc_4_set_power(struct device *dev, int slot, int power_on,
320 int vdd)
321{
322 return 0;
323}
324
319static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep, 325static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
320 int vdd, int cardsleep) 326 int vdd, int cardsleep)
321{ 327{
@@ -326,7 +332,7 @@ static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
326 return regulator_set_mode(host->vcc, mode); 332 return regulator_set_mode(host->vcc, mode);
327} 333}
328 334
329static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep, 335static int omap_hsmmc_235_set_sleep(struct device *dev, int slot, int sleep,
330 int vdd, int cardsleep) 336 int vdd, int cardsleep)
331{ 337{
332 struct omap_hsmmc_host *host = 338 struct omap_hsmmc_host *host =
@@ -365,6 +371,12 @@ static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
365 return regulator_enable(host->vcc_aux); 371 return regulator_enable(host->vcc_aux);
366} 372}
367 373
374static int omap_hsmmc_4_set_sleep(struct device *dev, int slot, int sleep,
375 int vdd, int cardsleep)
376{
377 return 0;
378}
379
368static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) 380static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
369{ 381{
370 struct regulator *reg; 382 struct regulator *reg;
@@ -379,10 +391,14 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
379 break; 391 break;
380 case OMAP_MMC2_DEVID: 392 case OMAP_MMC2_DEVID:
381 case OMAP_MMC3_DEVID: 393 case OMAP_MMC3_DEVID:
394 case OMAP_MMC5_DEVID:
382 /* Off-chip level shifting, or none */ 395 /* Off-chip level shifting, or none */
383 mmc_slot(host).set_power = omap_hsmmc_23_set_power; 396 mmc_slot(host).set_power = omap_hsmmc_235_set_power;
384 mmc_slot(host).set_sleep = omap_hsmmc_23_set_sleep; 397 mmc_slot(host).set_sleep = omap_hsmmc_235_set_sleep;
385 break; 398 break;
399 case OMAP_MMC4_DEVID:
400 mmc_slot(host).set_power = omap_hsmmc_4_set_power;
401 mmc_slot(host).set_sleep = omap_hsmmc_4_set_sleep;
386 default: 402 default:
387 pr_err("MMC%d configuration not supported!\n", host->id); 403 pr_err("MMC%d configuration not supported!\n", host->id);
388 return -EINVAL; 404 return -EINVAL;
@@ -1555,7 +1571,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
1555 break; 1571 break;
1556 } 1572 }
1557 1573
1558 if (host->id == OMAP_MMC1_DEVID) { 1574 if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
1559 /* Only MMC1 can interface at 3V without some flavor 1575 /* Only MMC1 can interface at 3V without some flavor
1560 * of external transceiver; but they all handle 1.8V. 1576 * of external transceiver; but they all handle 1.8V.
1561 */ 1577 */
@@ -1647,7 +1663,7 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host)
1647 u32 hctl, capa, value; 1663 u32 hctl, capa, value;
1648 1664
1649 /* Only MMC1 supports 3.0V */ 1665 /* Only MMC1 supports 3.0V */
1650 if (host->id == OMAP_MMC1_DEVID) { 1666 if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
1651 hctl = SDVS30; 1667 hctl = SDVS30;
1652 capa = VS30 | VS18; 1668 capa = VS30 | VS18;
1653 } else { 1669 } else {
@@ -2101,14 +2117,14 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
2101 /* we start off in DISABLED state */ 2117 /* we start off in DISABLED state */
2102 host->dpm_state = DISABLED; 2118 host->dpm_state = DISABLED;
2103 2119
2104 if (mmc_host_enable(host->mmc) != 0) { 2120 if (clk_enable(host->iclk) != 0) {
2105 clk_put(host->iclk); 2121 clk_put(host->iclk);
2106 clk_put(host->fclk); 2122 clk_put(host->fclk);
2107 goto err1; 2123 goto err1;
2108 } 2124 }
2109 2125
2110 if (clk_enable(host->iclk) != 0) { 2126 if (mmc_host_enable(host->mmc) != 0) {
2111 mmc_host_disable(host->mmc); 2127 clk_disable(host->iclk);
2112 clk_put(host->iclk); 2128 clk_put(host->iclk);
2113 clk_put(host->fclk); 2129 clk_put(host->fclk);
2114 goto err1; 2130 goto err1;