public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Subhash Jadavani <subhashj@codeaurora.org>
Cc: Balaji T K <balajitk@ti.com>, linux-mmc@vger.kernel.org, cjb@laptop.org
Subject: Re: [PATCH v2] mmc: core: eMMC in Sleep mode before suspend
Date: Fri, 09 Sep 2011 09:56:36 +0300	[thread overview]
Message-ID: <4E69B8A4.5070008@intel.com> (raw)
In-Reply-To: <894c55383fbf1d731bb52d5279b08f80.squirrel@www.codeaurora.org>

On 09/09/11 09:34, Subhash Jadavani wrote:
> Hi Balaji,
>
>> Put MMC to sleep if it supports SLEEP/AWAKE (CMD5)
>> in the mmc suspend so that Vcc (NAND core) can be cut
>> to minimize power consumption.
>> eMMC put into SLEEP can respond to CMD0 or H/W reset or CMD5.
>> Current implemention on resume from suspend relies on CMD0 in
>> mmc_init_card to get out of SLEEP mode.
>>
>> Signed-off-by: Balaji T K<balajitk@ti.com>
>> Acked-by: Venkatraman S<svenkatr@ti.com>
>> ---
>>   drivers/mmc/core/mmc.c |    9 +++++++--
>>   1 files changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>> index 5700b1c..f73fcee 100644
>> --- a/drivers/mmc/core/mmc.c
>> +++ b/drivers/mmc/core/mmc.c
>> @@ -553,6 +553,7 @@ static int mmc_init_card(struct mmc_host *host, u32
>> ocr,
>>   	 * need to tell some cards to go back to the idle
>>   	 * state.  We wait 1ms to give cards time to
>>   	 * respond.
>> +	 * mmc_go_idle is needed for eMMC that are asleep
>>   	 */
>>   	mmc_go_idle(host);
>>
>> @@ -900,16 +901,20 @@ static void mmc_detect(struct mmc_host *host)
>>    */
>>   static int mmc_suspend(struct mmc_host *host)
>>   {
>> +	int err = 0;
>> +
>>   	BUG_ON(!host);
>>   	BUG_ON(!host->card);
>>
>>   	mmc_claim_host(host);
>> -	if (!mmc_host_is_spi(host))
>> +	if (mmc_card_can_sleep(host))
>> +		err = mmc_card_sleep(host);
>> +	else if (!mmc_host_is_spi(host))
>>   		mmc_deselect_cards(host);
>>   	host->card->state&= ~MMC_STATE_HIGHSPEED;
>>   	mmc_release_host(host);
>>
>> -	return 0;
>> +	return err;
>>   }
>
> Looks good to me:
> Reviewed-by: Subhash Jadavani<subhashj@codeaurora.org>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

>
> Thanks,
> Subhash
>
>>
>>   /*
>> --
>> 1.7.0.4
>>
>>
>
>


  reply	other threads:[~2011-09-09  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 16:38 [PATCH v2] mmc: core: eMMC in Sleep mode before suspend Balaji T K
2011-09-09  6:34 ` Subhash Jadavani
2011-09-09  6:56   ` Adrian Hunter [this message]
2011-09-21 17:47 ` Chris Ball
2012-04-12  4:24 ` Chris Ball
2012-04-12  7:22   ` T Krishnamoorthy, Balaji

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=4E69B8A4.5070008@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=balajitk@ti.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=subhashj@codeaurora.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox