summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Bansal <rbansal@nvidia.com>2010-05-28 11:59:20 +0530
committerGary King <gking@nvidia.com>2010-06-02 09:44:58 -0700
commit39e090b49c224778b5b83ac05ec948dffb717f3b (patch)
tree4f8deac74dbd93c5f730c22ae01a358043bd56ad
parent38a9d99c28da41805ebde7f85f4c0d377684da4e (diff)
tegra sdhci: Enabling sdio cards suspend/resume
SDIO-WIFI Behavior - 1) With or without MMC_UNSAFE_RESUME setting - As "sdio_driver" in mmc stack doesn't have suspend/resume handlers so even if MMC_UNSAFE_RESUME is set, SDIO-WIFI driver's remove/probe is called for mmc suspend/resume. Thus, on suspend (LP1 or LP0) wifi is turned off and is disconnected. On resume (from LP1 or LP0), wifi is turned on and is reconnected. 2) For all cards including sdio, power to rail is cut. On suspend for sdio slot NvOdmSdioSuspend() is called. On resume for sdio slot NvOdmSdioResume() is called. Change-Id: I52e65b08a884a16f47cf5b1e4fcbb187ea4281e6 Reviewed-on: http://git-master/r/1776 Reviewed-by: Kapil Hali <khali@nvidia.com> Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Rahul Bansal <rbansal@nvidia.com> Tested-by: Rahul Bansal <rbansal@nvidia.com> Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Tested-by: Narendra Damahe <ndamahe@nvidia.com> Tested-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
-rwxr-xr-xdrivers/mmc/host/sdhci-tegra.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index a278af5e75f5..739ac876cb15 100755
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -382,12 +382,12 @@ static int tegra_sdhci_suspend(struct platform_device *pdev, pm_message_t state)
t_sdhci = platform_get_drvdata(pdev);
- if (t_sdhci->sdhost->card_type != MMC_TYPE_SDIO) {
- ret = sdhci_suspend_host(t_sdhci->sdhost,state);
- if (ret)
- pr_err("sdhci_suspend_host failed with error %d\n", ret);
- NvOdmSdioSuspend(t_sdhci->hSdioHandle);
- }
+ ret = sdhci_suspend_host(t_sdhci->sdhost,state);
+
+ if (ret)
+ pr_err("sdhci_suspend_host failed with error %d\n", ret);
+
+ NvOdmSdioSuspend(t_sdhci->hSdioHandle);
return ret;
}
@@ -398,16 +398,18 @@ static int tegra_sdhci_resume(struct platform_device *pdev)
struct tegra_sdhci *t_sdhci;
t_sdhci = platform_get_drvdata(pdev);
- if (t_sdhci->sdhost->card_type != MMC_TYPE_SDIO) {
- /* enable clock to sdio controller */
- ret = tegra_sdhci_set_controller_clk(t_sdhci, NV_TRUE);
- if (ret)
- pr_err("tegra_sdhci_resume:tegra_sdhci_set_clock failed with error %d\n", ret);
- NvOdmSdioResume(t_sdhci->hSdioHandle);
- ret = sdhci_resume_host(t_sdhci->sdhost);
- if (ret)
- pr_err("sdhci_resume_host failed with error %d\n", ret);
- }
+
+ /* enable clock to sdio controller */
+ ret = tegra_sdhci_set_controller_clk(t_sdhci, NV_TRUE);
+
+ if (ret)
+ pr_err("tegra_sdhci_resume:tegra_sdhci_set_clock failed with error %d\n", ret);
+
+ NvOdmSdioResume(t_sdhci->hSdioHandle);
+
+ ret = sdhci_resume_host(t_sdhci->sdhost);
+ if (ret)
+ pr_err("sdhci_resume_host failed with error %d\n", ret);
return ret;
}