From 8c8eda3eb618bd7bed2d1339584ece423300563c Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Mon, 19 Dec 2011 16:24:19 +0100 Subject: mmc: core: Add option to prevent eMMC sleep command Host may now use MMC_CAP2_NO_SLEEP_CMD to disable the use of eMMC sleep/awake command. This option can be used when your platform has a buggy kernel crash dump software, which is supposed to store the dump on the eMMC, but is not able to wake up the eMMC from sleep state. In particular, failures have been seen with u-boot; even if it is fixed there, platforms will be slow to update their bootloader binaries. Change-Id: I403f4b2a231dde087095a660189dc2f4e79edfd5 Signed-off-by: Ulf Hansson Reviewed-by: Hanumath Prasad Reviewed-by: Srinidhi Kasagar Acked-by: Subhash Jadavani Signed-off-by: Chris Ball Bug 1007644 Bug 936069 Signed-off-by: Pavan Kunapuli Change-Id: I8b2834e154e338a97bd6d82f177809d47d318ff0 Reviewed-on: http://git-master/r/118914 Reviewed-by: Rohan Somvanshi Tested-by: Rohan Somvanshi --- drivers/mmc/core/core.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/mmc') diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 3fe73a7c1e99..f7528db8fd06 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2183,6 +2183,9 @@ int mmc_card_awake(struct mmc_host *host) { int err = -ENOSYS; + if (host->caps2 & MMC_CAP2_NO_SLEEP_CMD) + return 0; + mmc_bus_get(host); if (host->bus_ops && !host->bus_dead && host->bus_ops->awake) @@ -2198,6 +2201,9 @@ int mmc_card_sleep(struct mmc_host *host) { int err = -ENOSYS; + if (host->caps2 & MMC_CAP2_NO_SLEEP_CMD) + return 0; + mmc_bus_get(host); if (host->bus_ops && !host->bus_dead && host->bus_ops->awake) -- cgit v1.2.3