From: "Subhash Jadavani" <subhashj@codeaurora.org>
To: 'Ulf Hansson' <ulf.hansson@stericsson.com>,
linux-mmc@vger.kernel.org, 'Chris Ball' <cjb@laptop.org>
Cc: 'Per Forlin' <per.forlin@stericsson.com>,
'Johan Rudholm' <johan.rudholm@stericsson.com>,
'Lee Jones' <lee.jones@linaro.org>
Subject: RE: [PATCH] mmc: core: Add option to prevent eMMC sleep command
Date: Wed, 14 Dec 2011 20:55:57 +0530 [thread overview]
Message-ID: <000601ccba74$afdb0180$0f910480$@org> (raw)
In-Reply-To: <1323876036-10206-1-git-send-email-ulf.hansson@stericsson.com>
Why is this patch needed? Do you see any issue with eMMC sleep on particular
cards?
Regards,
Subhash
> -----Original Message-----
> From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-
> owner@vger.kernel.org] On Behalf Of Ulf Hansson
> Sent: Wednesday, December 14, 2011 8:51 PM
> To: linux-mmc@vger.kernel.org; Chris Ball
> Cc: Per Forlin; Ulf Hansson; Johan Rudholm; Lee Jones
> Subject: [PATCH] mmc: core: Add option to prevent eMMC sleep command
>
> Host may now use MMC_CAP2_NOSLEEP to disable the use of
> eMMC sleep/awake command.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
> Reviewed-by: Hanumath Prasad <hanumath.prasad@stericsson.com>
> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> ---
> drivers/mmc/core/core.c | 6 ++++++
> include/linux/mmc/host.h | 1 +
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index a2aa860..5a1ce37 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2246,6 +2246,9 @@ int mmc_card_awake(struct mmc_host *host)
> {
> int err = -ENOSYS;
>
> + if (host->caps2 & MMC_CAP2_NOSLEEP)
> + return 0;
> +
> mmc_bus_get(host);
>
> if (host->bus_ops && !host->bus_dead && host->bus_ops->awake)
> @@ -2261,6 +2264,9 @@ int mmc_card_sleep(struct mmc_host *host)
> {
> int err = -ENOSYS;
>
> + if (host->caps2 & MMC_CAP2_NOSLEEP)
> + return 0;
> +
> mmc_bus_get(host);
>
> if (host->bus_ops && !host->bus_dead && host->bus_ops->sleep)
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index 9a03d03..d07fb27 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -242,6 +242,7 @@ struct mmc_host {
> #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */
> #define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff
> supported */
> #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads
> don't work */
> +#define MMC_CAP2_NOSLEEP (1 << 4) /* Don't allow sleep command
> */
>
> mmc_pm_flag_t pm_caps; /* supported pm features */
> unsigned int power_notify_type;
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-12-14 15:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 15:20 [PATCH] mmc: core: Add option to prevent eMMC sleep command Ulf Hansson
2011-12-14 15:25 ` Subhash Jadavani [this message]
2011-12-14 15:34 ` Ulf Hansson
2011-12-14 15:38 ` Subhash Jadavani
2011-12-14 16:48 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000601ccba74$afdb0180$0f910480$@org' \
--to=subhashj@codeaurora.org \
--cc=cjb@laptop.org \
--cc=johan.rudholm@stericsson.com \
--cc=lee.jones@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=per.forlin@stericsson.com \
--cc=ulf.hansson@stericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.