summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@stericsson.com>2011-09-22 13:15:27 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:02:58 +0200
commit2ba5452332b14b39eb20d54c5add45f81ed341fd (patch)
tree0f9f6870ac267389e642b1cb20508c7d34bc799c
parentae377cfb84e6e6a7663792fc5bcb271d2459677d (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
-rw-r--r--arch/arm/mach-ux500/board-u5500-sdi.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c
index de6e0e5192b..74be6fad286 100644
--- a/arch/arm/mach-ux500/board-u5500-sdi.c
+++ b/arch/arm/mach-ux500/board-u5500-sdi.c
@@ -64,17 +64,9 @@ static struct mmci_platform_data u5500_sdi0_data = {
* SDI 1 (MicroSD slot)
*/
-/* MMCIPOWER bits */
-#define MCI_DATA2DIREN (1 << 2)
-#define MCI_CMDDIREN (1 << 3)
-#define MCI_DATA0DIREN (1 << 4)
-#define MCI_DATA31DIREN (1 << 5)
-#define MCI_FBCLKEN (1 << 7)
-
-static u32 u5500_sdi1_vdd_handler(struct device *dev, unsigned int vdd,
- unsigned char power_mode)
+static int u5500_sdi1_ios_handler(struct device *dev, struct mmc_ios *ios)
{
- switch (power_mode) {
+ switch (ios->power_mode) {
case MMC_POWER_UP:
case MMC_POWER_ON:
/*
@@ -93,8 +85,7 @@ static u32 u5500_sdi1_vdd_handler(struct device *dev, unsigned int vdd,
break;
}
- return MCI_FBCLKEN | MCI_CMDDIREN | MCI_DATA0DIREN |
- MCI_DATA2DIREN;
+ return 0;
}
static struct stedma40_chan_cfg sdi1_dma_cfg_rx = {
@@ -116,7 +107,7 @@ static struct stedma40_chan_cfg sdi1_dma_cfg_tx = {
};
static struct mmci_platform_data u5500_sdi1_data = {
- .vdd_handler = u5500_sdi1_vdd_handler,
+ .ios_handler = u5500_sdi1_ios_handler,
.ocr_mask = MMC_VDD_29_30,
.f_max = 50000000,
.capabilities = MMC_CAP_4_BIT_DATA |