aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@stericsson.com>2011-05-11 15:58:07 +0200
committerSebastian RASMUSSEN <sebastian.rasmussen@stericsson.com>2011-05-11 16:12:45 +0200
commit02c95eb31ddd702c67b79082472732e6f1456ca4 (patch)
treef095cd39766ac253c727b3c2e8d6d7fb7f7ddb69
parentbc9540c9e88d4048214dcdf2f66f9fd5c6710a77 (diff)
mach-ux500:u5500: Fixup vdd_handler for sdi1u5500-android-2.3_v0.64
Levelshifter was not enabled at POWER_ON, this is corrected. Change-Id: Ide45208ab89672086a95e5f7468330a148aad033 Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/22896 Reviewed-by: Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/board-u5500-sdi.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c
index 1e8a6f55f1b..f42c5b4e4b3 100644
--- a/arch/arm/mach-ux500/board-u5500-sdi.c
+++ b/arch/arm/mach-ux500/board-u5500-sdi.c
@@ -105,18 +105,27 @@ static struct mmci_platform_data u5500_sdi0_data = {
static void u5500_sdi1_vdd_handler(struct device *dev, unsigned int vdd,
unsigned char power_mode)
{
- /*
- * Level shifter voltage should depend on vdd to when deciding
- * on either 1.8V or 2.9V. Once the decision has been made the
- * level shifter must be disabled and re-enabled with a changed
- * select signal in order to switch the voltage. Since there is
- * no framework support yet for indicating 1.8V in vdd, use the
- * default 2.9V.
- */
- if (power_mode == MMC_POWER_UP)
- gpio_set_value_cansleep(GPIO_MMC_CARD_CTRL, 1);
- else if (power_mode == MMC_POWER_OFF)
- gpio_set_value_cansleep(GPIO_MMC_CARD_CTRL, 0);
+ switch (power_mode) {
+ case MMC_POWER_UP:
+ case MMC_POWER_ON:
+ /*
+ * Level shifter voltage should depend on vdd to when deciding
+ * on either 1.8V or 2.9V. Once the decision has been made the
+ * level shifter must be disabled and re-enabled with a changed
+ * select signal in order to switch the voltage. Since there is
+ * no framework support yet for indicating 1.8V in vdd, use the
+ * default 2.9V.
+ */
+
+ /* Enable level shifter */
+ gpio_direction_output(GPIO_MMC_CARD_CTRL, 1);
+ udelay(100);
+ break;
+ case MMC_POWER_OFF:
+ /* Disable level shifter */
+ gpio_direction_output(GPIO_MMC_CARD_CTRL, 0);
+ break;
+ }
}
static struct mmci_platform_data u5500_sdi1_data = {