summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
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;
}