From: Ulf Hansson <ulf.hansson@stericsson.com>
To: Saugata Das <saugata.das@linaro.org>
Cc: Per Forlin <per.lkml@gmail.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Girish K S <girish.shivananjappa@linaro.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"cjb@laptop.org" <cjb@laptop.org>,
"patches@linaro.org" <patches@linaro.org>,
"subhashj@codeaurora.org" <subhashj@codeaurora.org>
Subject: Re: [PATCH v5] MMC-4.5 Power OFF Notify Rework
Date: Fri, 15 Jun 2012 14:07:22 +0200 [thread overview]
Message-ID: <4FDB257A.8060305@stericsson.com> (raw)
In-Reply-To: <CAKLKtzcMk+H-ZeLs6nOP8B8PnCtK+A0emU_tZtGGacnYueg0dQ@mail.gmail.com>
On 06/15/2012 01:34 PM, Saugata Das wrote:
> On 15 June 2012 16:56, Ulf Hansson<ulf.hansson@stericsson.com> wrote:
>> Hi Saugata,
>>
>> snip.
>>
>>
>>>>>>>
>>>>>>> The problem in sending CMD0 without power OFF notify is possibility of
>>>>>>> some data loss in MMC-4.5 devices.
>>>>>>
>>>>>>
>>>>>>
>>>>>> I don't see the problem here. You will be sending power OFF notify when
>>>>>> you
>>>>>> can. The only difference is when you "wake" the device from sleep mode.
>>>>>> Instead of using CMD5, which may work is some cases and in some cases
>>>>>> not
>>>>>> (without restoring ios). So using CMD0 as common way of waking up from
>>>>>> suspend should be fine. Unless I missed something of course. :-)
>>>>>>
>>>>>
>>>>> CMD0 is a reset. I expect with power OFF notify enable, the eMMC
>>>>> device will postpone some control information update to its internal
>>>>> non-volatile memory (e.g. some data structures which are kept in the
>>>>> controller buffers and not stored in NAND). If we do a CMD0, then the
>>>>> eMMC device will be reset and we may lose some data. In addition to
>>>>> that, doing complete card initialization will increase the wakeup time
>>>>> (for 4.4 devices).
>>
>>
>> When doing poweroff_notify at suspend you have _always_ cut both vcc and
>> vccq, according to MMC_CAP2_POWER_OFF_VCCQ_DURING_SUSPEND, which means you
>> must always use CMD0 to wake up. There is no present internal cache in the
>> eMMC here.
>>
>> In sleep mode, you can use CMD5, but until the poweroff notify patches (the
>> patch that broke suspend/resume, not this one), we have used CMD0 to wake
>> up. Let's go back to that solution. Then we can address you concern about
>> "data loss" for sleep mode in separate patch.
>>
>
> Yes, you will get back to the same code flow with the introduction of
> the MMC_CAP2_NO_INIT_ON_RESUME. If some host drivers are capable of
> executing the CMD5 resume then they enable this cap and go on the
> optimized path. The rest go on CMD0 path.
Please do that as a separate patch so we can get this merged asap.
Moreover, I think we should try to prevent from adding another cap for this.
There are another option for a host driver tell whether CMD0 shall be
used or not, by using the regulator supplies. See a patch by Guennadi
Liakhovetski in: http://article.gmane.org/gmane.linux.kernel.mmc/14635,
still being discussed though.
The MMC_CAP2_POWER_OFF_VCCQ_DURING_SUSPEND, can likely soon be removed
as well, when above patch is accepted and host driver is starting to use
the new API.
Kind regards
Ulf Hansson
prev parent reply other threads:[~2012-06-15 12:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 11:45 [PATCH v5] MMC-4.5 Power OFF Notify Rework Girish K S
2012-05-23 8:00 ` Subhash Jadavani
2012-05-23 11:16 ` Ulf Hansson
2012-05-28 11:03 ` Subhash Jadavani
2012-05-28 15:07 ` Saugata Das
2012-05-29 3:36 ` Girish K S
2012-06-14 13:13 ` Per Forlin
2012-06-14 13:21 ` Girish K S
2012-06-14 14:50 ` Ulf Hansson
2012-06-14 15:15 ` Saugata Das
2012-06-14 19:06 ` Per Forlin
2012-06-15 3:49 ` Saugata Das
2012-06-15 7:22 ` Ulf Hansson
2012-06-15 7:49 ` Per Forlin
2012-06-15 8:34 ` Saugata Das
2012-06-15 9:52 ` Per Forlin
2012-06-15 10:52 ` Saugata Das
2012-06-15 11:26 ` Ulf Hansson
2012-06-15 11:34 ` Saugata Das
2012-06-15 12:07 ` Ulf Hansson [this message]
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=4FDB257A.8060305@stericsson.com \
--to=ulf.hansson@stericsson.com \
--cc=cjb@laptop.org \
--cc=girish.shivananjappa@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=patches@linaro.org \
--cc=per.lkml@gmail.com \
--cc=saugata.das@linaro.org \
--cc=subhashj@codeaurora.org \
--cc=ulf.hansson@linaro.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 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.