summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/mmci.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@stericsson.com>2011-09-22 13:15:27 +0200
committerUlf HANSSON <ulf.hansson@stericsson.com>2011-09-23 15:13:25 +0200
commit7fbb06612c0f054ae4689deeab8d2b37d3144f94 (patch)
tree28b759b8b1962bb67214d28fcbe1ddc30e206d7e /drivers/mmc/host/mmci.c
parentbe4416a9e71b65ebd1d56e8c4fc64a0a55eb522a (diff)
mmc: mmci: Change vdd_handler to a generic ios handler
The purpose of the vdd_handler does not make sense. We remove it and use a more generic approach instead. A new "ios" handler is thus added, the purpose of which e.g. can be to control GPIO pins to a levelshifter. Previously the vdd_handler was also used for making additional changes to the MMCIPOWER register bits. This option is now removed. This patch is based upon a patch from Sebastian Rasmussen. Change-Id: I250c7d243946acd9cc9da2d4d18394db1256cd27 Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Signed-off-by: Sebastian Rasmussen <sebastian.rasmussen@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31883
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r--drivers/mmc/host/mmci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 470f035e087..baa7883c49e 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1047,6 +1047,10 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
unsigned long flags;
int ret;
+ if (host->plat->ios_handler &&
+ host->plat->ios_handler(mmc_dev(mmc), ios))
+ dev_err(mmc_dev(mmc), "platform ios_handler failed\n");
+
switch (ios->power_mode) {
case MMC_POWER_OFF:
if (host->vcc)
@@ -1066,10 +1070,6 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
return;
}
}
- if (host->plat->vdd_handler)
- pwr |= host->plat->vdd_handler(mmc_dev(mmc), ios->vdd,
- ios->power_mode);
-
/*
* The ST Micro variant doesn't have the PL180s MCI_PWR_UP
* and instead uses MCI_PWR_ON so apply whatever value is