summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorsimon_chuang <simon_chuang@asus.com>2012-05-09 12:29:02 -0700
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-02-03 16:24:58 +0100
commitdadec4519ba16fa9fd4d95270d009f08a1811577 (patch)
tree1c187083713b5ff9bf64914fd22ef5dbe4bd4daf /drivers
parent7f7b042a978edfc6c7d1e14ec9c6ec01ffcc284b (diff)
eMMC: Fix electric leakage SDMMC4_DAT0~DAT7 in Nakasi
Change-Id: Ia56018522e5d18ca5bfd25858ec943da93d3edc3 (cherry picked from commit e363e576f448d6132340c5d0bda580fef212888d) Conflicts: drivers/mmc/host/sdhci-tegra.c
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-tegra.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 07109f8f4ba7..ae4f1c1ac501 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -32,6 +32,8 @@
#include <mach/io_dpd.h>
#include "sdhci-pltfm.h"
+#include <../gpio-names.h>
+#include "../debug_mmc.h"
#define SDHCI_VENDOR_CLOCK_CNTRL 0x100
#define SDHCI_VENDOR_CLOCK_CNTRL_SDMMC_CLK 0x1
@@ -879,6 +881,37 @@ static int tegra_sdhci_suspend(struct sdhci_host *sdhci, pm_message_t state)
mutex_unlock(&tegra_host->dpd->delay_lock);
}
+ if (!strcmp(mmc_hostname(sdhci->mmc), "mmc0")) {
+ MMC_printk("%s: pull up data pin", mmc_hostname(sdhci->mmc));
+
+ tegra_gpio_enable(TEGRA_GPIO_PAA0);
+ tegra_gpio_enable(TEGRA_GPIO_PAA1);
+ tegra_gpio_enable(TEGRA_GPIO_PAA2);
+ tegra_gpio_enable(TEGRA_GPIO_PAA3);
+ tegra_gpio_enable(TEGRA_GPIO_PAA4);
+ tegra_gpio_enable(TEGRA_GPIO_PAA5);
+ tegra_gpio_enable(TEGRA_GPIO_PAA6);
+ tegra_gpio_enable(TEGRA_GPIO_PAA7);
+
+ gpio_request(TEGRA_GPIO_PAA0, "PAA0");
+ gpio_request(TEGRA_GPIO_PAA1, "PAA1");
+ gpio_request(TEGRA_GPIO_PAA2, "PAA2");
+ gpio_request(TEGRA_GPIO_PAA3, "PAA3");
+ gpio_request(TEGRA_GPIO_PAA4, "PAA4");
+ gpio_request(TEGRA_GPIO_PAA5, "PAA5");
+ gpio_request(TEGRA_GPIO_PAA6, "PAA6");
+ gpio_request(TEGRA_GPIO_PAA7, "PAA7");
+
+ gpio_direction_output(TEGRA_GPIO_PAA0, 1);
+ gpio_direction_output(TEGRA_GPIO_PAA1, 1);
+ gpio_direction_output(TEGRA_GPIO_PAA2, 1);
+ gpio_direction_output(TEGRA_GPIO_PAA3, 1);
+ gpio_direction_output(TEGRA_GPIO_PAA4, 1);
+ gpio_direction_output(TEGRA_GPIO_PAA5, 1);
+ gpio_direction_output(TEGRA_GPIO_PAA6, 1);
+ gpio_direction_output(TEGRA_GPIO_PAA7, 1);
+ }
+
return 0;
}
@@ -909,6 +942,19 @@ static int tegra_sdhci_resume(struct sdhci_host *sdhci)
sdhci->pwr = 0;
}
+ if (!strcmp(mmc_hostname(sdhci->mmc), "mmc0")) {
+ MMC_printk("%s: disable data pin", mmc_hostname(sdhci->mmc));
+
+ tegra_gpio_disable(TEGRA_GPIO_PAA0);
+ tegra_gpio_disable(TEGRA_GPIO_PAA1);
+ tegra_gpio_disable(TEGRA_GPIO_PAA2);
+ tegra_gpio_disable(TEGRA_GPIO_PAA3);
+ tegra_gpio_disable(TEGRA_GPIO_PAA4);
+ tegra_gpio_disable(TEGRA_GPIO_PAA5);
+ tegra_gpio_disable(TEGRA_GPIO_PAA6);
+ tegra_gpio_disable(TEGRA_GPIO_PAA7);
+ }
+
return 0;
}