summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@stericsson.com>2012-02-24 11:22:42 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:01 +0200
commitbe2ec17ae364a4e1e6595ad5d620062df149a9ca (patch)
tree8eb7c3332aa9a4037ec83a3ddf6309348b28c1c7
parentc3921020050e5a2d4c09cc3709ac1e192e399b69 (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 1dc8d379e4d..c7a645930ce 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1235,6 +1235,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;
@@ -1251,6 +1266,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,