aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@stericsson.com>2012-02-24 11:22:42 +0100
committerPhilippe Langlais <philippe.langlais@linaro.org>2012-03-06 17:30:19 +0100
commitde905ebabc69d9618b61896f0c45310134c76e05 (patch)
treea7cf7a32213a36fd3bbd1cc4d01ad92552820490
parent85dfb19d74d7de94c21eaec00a459bed8c555af9 (diff)
mmc: mmci: Add support for start_signal_voltage_switch
This function switches I/O voltage, which is needed to support UHS-I cards with 1.8V I/O. Change-Id: Id33a9c6e15bd4ba598e533bf9115cb7583369706 Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/50383 Reviewed-by: Per FORLIN <per.forlin@stericsson.com>
-rw-r--r--drivers/mmc/host/mmci.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index fdf7d8f894e..6d42941c600 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1232,6 +1232,21 @@ static int mmci_get_cd(struct mmc_host *mmc)
return status;
}
+static int mmci_sig_volt_switch(struct mmc_host *mmc, struct mmc_ios *ios)
+{
+ struct mmci_host *host = mmc_priv(mmc);
+ int ret = 0;
+
+ if (host->plat->ios_handler) {
+ pm_runtime_get_sync(mmc_dev(mmc));
+ ret = host->plat->ios_handler(mmc_dev(mmc), ios);
+ pm_runtime_mark_last_busy(mmc_dev(mmc));
+ pm_runtime_put_autosuspend(mmc_dev(mmc));
+ }
+
+ return ret;
+}
+
static irqreturn_t mmci_cd_irq(int irq, void *dev_id)
{
struct mmci_host *host = dev_id;
@@ -1248,6 +1263,7 @@ static const struct mmc_host_ops mmci_ops = {
.set_ios = mmci_set_ios,
.get_ro = mmci_get_ro,
.get_cd = mmci_get_cd,
+ .start_signal_voltage_switch = mmci_sig_volt_switch,
};
static int __devinit mmci_probe(struct amba_device *dev,