aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorGirish K S <girish.shivananjappa@linaro.org>2011-10-13 02:34:16 -0400
committerChris Ball <cjb@laptop.org>2011-10-26 16:32:23 -0400
commitbec8726abc72bf30d2743a722aa37cd69e7a0580 (patch)
treeeed4a3c441ff64f5719b021fce419de0fc5196d9 /drivers/mmc/host/sdhci.c
parent326adda53a50ece492c3edaa60afc26fba5e3232 (diff)
mmc: core: Add Power Off Notify Feature eMMC 4.5
This patch adds support for the power off notify feature, available in eMMC 4.5 devices. If the host has support for this feature, then the mmc core will notify the device by setting the POWER_OFF_NOTIFICATION byte in the extended csd register with a value of 1 (POWER_ON). For suspend mode short timeout is used, whereas for the normal poweroff long timeout is used. Signed-off-by: Girish K S <girish.shivananjappa@linaro.org> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 2cc3ffa7d766..6d8eea323541 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2739,6 +2739,15 @@ int sdhci_add_host(struct sdhci_host *host)
2739 if (caps[1] & SDHCI_DRIVER_TYPE_D) 2739 if (caps[1] & SDHCI_DRIVER_TYPE_D)
2740 mmc->caps |= MMC_CAP_DRIVER_TYPE_D; 2740 mmc->caps |= MMC_CAP_DRIVER_TYPE_D;
2741 2741
2742 /*
2743 * If Power Off Notify capability is enabled by the host,
2744 * set notify to short power off notify timeout value.
2745 */
2746 if (mmc->caps2 & MMC_CAP2_POWEROFF_NOTIFY)
2747 mmc->power_notify_type = MMC_HOST_PW_NOTIFY_SHORT;
2748 else
2749 mmc->power_notify_type = MMC_HOST_PW_NOTIFY_NONE;
2750
2742 /* Initial value for re-tuning timer count */ 2751 /* Initial value for re-tuning timer count */
2743 host->tuning_count = (caps[1] & SDHCI_RETUNING_TIMER_COUNT_MASK) >> 2752 host->tuning_count = (caps[1] & SDHCI_RETUNING_TIMER_COUNT_MASK) >>
2744 SDHCI_RETUNING_TIMER_COUNT_SHIFT; 2753 SDHCI_RETUNING_TIMER_COUNT_SHIFT;