summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBitan Biswas <bbiswas@nvidia.com>2012-01-02 13:05:11 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-01-04 11:45:35 +0530
commit11d18187ac92974548268a8a92fee1272298600e (patch)
tree8b8533c84e5410d0ed379698f0584d887f3b6f83 /drivers
parent9b81082b053ee72f5b3185152c0157f8e85c99eb (diff)
mmc: tegra: io dpd support added
Enabled io dpd when clock is disabled for each SD instance. Clock enable for the SD instance causes io dpd to be disabled. bug 919993 Change-Id: I7d58517a7c51ce969a167abf7bb90ea89731d999 Signed-off-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-on: http://git-master/r/72027 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-tegra.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index c429cc754964..1cca7cfe9bc0 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -26,6 +26,7 @@
#include <mach/gpio.h>
#include <mach/sdhci.h>
+#include <mach/io_dpd.h>
#include "sdhci-pltfm.h"
@@ -91,6 +92,7 @@ struct tegra_sdhci_host {
unsigned int vddio_max_uv;
/* max clk supported by the platform */
unsigned int max_clk_limit;
+ struct tegra_io_dpd *dpd;
};
static u32 tegra_sdhci_readl(struct sdhci_host *host, int reg)
@@ -423,6 +425,9 @@ static void tegra_sdhci_set_clock(struct sdhci_host *sdhci, unsigned int clock)
mmc_hostname(sdhci->mmc), clock, tegra_host->clk_enabled);
if (clock) {
+ /* bring out sd instance from io dpd mode */
+ tegra_io_dpd_disable(tegra_host->dpd);
+
if (!tegra_host->clk_enabled) {
clk_enable(pltfm_host->clk);
ctrl = sdhci_readb(sdhci, SDHCI_VENDOR_CLOCK_CNTRL);
@@ -441,6 +446,8 @@ static void tegra_sdhci_set_clock(struct sdhci_host *sdhci, unsigned int clock)
sdhci_writeb(sdhci, ctrl, SDHCI_VENDOR_CLOCK_CNTRL);
clk_disable(pltfm_host->clk);
tegra_host->clk_enabled = false;
+ /* io dpd enable call for sd instance */
+ tegra_io_dpd_enable(tegra_host->dpd);
}
}
@@ -744,6 +751,7 @@ static int __devinit sdhci_tegra_probe(struct platform_device *pdev)
tegra_host->clk_enabled = true;
tegra_host->max_clk_limit = plat->max_clk_limit;
tegra_host->instance = pdev->id;
+ tegra_host->dpd = tegra_io_dpd_get(mmc_dev(host->mmc));
host->mmc->pm_caps = plat->pm_flags;