summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/board-u5500-sdi.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 /arch/arm/mach-ux500/board-u5500-sdi.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 'arch/arm/mach-ux500/board-u5500-sdi.c')
-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 dec306ea705..b2801f76fa1 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 |