diff options
author | Naveen Kumar Arepalli <naveenk@nvidia.com> | 2013-01-29 16:24:57 +0530 |
---|---|---|
committer | Mandar Padmawar <mpadmawar@nvidia.com> | 2013-02-05 03:33:16 -0800 |
commit | 80f665b47c9a6618f187f462b8ae59571f61b493 (patch) | |
tree | 23944dca94f7d55db4ef5bcd17d8add9ff9ac138 /drivers/mmc | |
parent | 66c6d58af5c5964b34f86a98d74193594eb35355 (diff) |
mmc: tegra: Fix SD Hot Plug Support in LP State
Fix SD Hot Plug Support in LP State, Card detect
tasklet is scheduled to detect sd card.
Bug 1204527
Change-Id: I688a8a4d64eeb880a542cf859eaba48878f66e35
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/192720
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 8ffef1e1011a..2fa55f26668c 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -212,6 +212,8 @@ struct sdhci_tegra { unsigned int max_clk_limit; /* max ddr clk supported by the platform */ unsigned int ddr_clk_limit; + /* SD Hot Plug in Suspend State */ + unsigned int sd_detect_in_suspend; struct tegra_io_dpd *dpd; bool card_present; bool is_rail_enabled; @@ -1580,9 +1582,13 @@ static void tegra_sdhci_post_resume(struct sdhci_host *sdhci) struct sdhci_pltfm_host *pltfm_host = sdhci_priv(sdhci); struct sdhci_tegra *tegra_host = pltfm_host->priv; - /* Turn OFF the clocks if the card is not present */ - if (!(tegra_host->card_present) && tegra_host->clk_enabled) + if (tegra_host->card_present) { + if (tegra_host->sd_detect_in_suspend) + tasklet_schedule(&sdhci->card_tasklet); + } else if (tegra_host->clk_enabled) { + /* Turn OFF the clocks if the card is not present */ tegra_sdhci_set_clock(sdhci, 0); + } } static void sdhci_tegra_error_stats_debugfs(struct sdhci_host *host) @@ -1910,6 +1916,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->ddr_clk_limit = plat->ddr_clk_limit; + tegra_host->sd_detect_in_suspend = plat->sd_detect_in_suspend; tegra_host->instance = pdev->id; tegra_host->dpd = tegra_io_dpd_get(mmc_dev(host->mmc)); |