* Cache Control during mmc_suspend_host
@ 2011-12-13 5:02 Saugata Das
2011-12-13 6:27 ` Seungwon Jeon
0 siblings, 1 reply; 6+ messages in thread
From: Saugata Das @ 2011-12-13 5:02 UTC (permalink / raw)
To: Seungwon Jeon, linux-mmc
Hi Seungwon Jeon
I see a small issue with the implementation mmc_suspend_host,
int mmc_suspend_host(struct mmc_host *host)
{
.....
err = mmc_cache_ctrl(host, 0);
}
So, within mmc_suspend_host we are disabling the cache. But I do not
see a corresponding enabling of cache within mmc_resume_host. I
suggest we have either enabling of cache within mmc_resume_host or
within mmc_suspend_host, we replace mmc_cache_ctrl(host, 0) with the
flush operation, mmc_flush_cache(host->card).
Regards
Saugata
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: Cache Control during mmc_suspend_host
2011-12-13 5:02 Cache Control during mmc_suspend_host Saugata Das
@ 2011-12-13 6:27 ` Seungwon Jeon
2011-12-13 10:37 ` Saugata Das
0 siblings, 1 reply; 6+ messages in thread
From: Seungwon Jeon @ 2011-12-13 6:27 UTC (permalink / raw)
To: 'Saugata Das', linux-mmc
Hi Saugata,
Saugata Das wrote:
> Hi Seungwon Jeon
>
> I see a small issue with the implementation mmc_suspend_host,
>
> int mmc_suspend_host(struct mmc_host *host)
> {
> .....
> err = mmc_cache_ctrl(host, 0);
> }
>
> So, within mmc_suspend_host we are disabling the cache. But I do not
> see a corresponding enabling of cache within mmc_resume_host. I
> suggest we have either enabling of cache within mmc_resume_host or
> within mmc_suspend_host, we replace mmc_cache_ctrl(host, 0) with the
> flush operation, mmc_flush_cache(host->card).
>
Currently,
Cache is enabled in mmc_init_card() during mmc_resume_host().
Thanks,
Seungwon Jeon.
>
>
> Regards
> Saugata
> --
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Cache Control during mmc_suspend_host
2011-12-13 6:27 ` Seungwon Jeon
@ 2011-12-13 10:37 ` Saugata Das
2011-12-14 4:34 ` Seungwon Jeon
0 siblings, 1 reply; 6+ messages in thread
From: Saugata Das @ 2011-12-13 10:37 UTC (permalink / raw)
To: Seungwon Jeon; +Cc: linux-mmc
On 13 December 2011 11:57, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> Hi Saugata,
>
> Saugata Das wrote:
>> Hi Seungwon Jeon
>>
>> I see a small issue with the implementation mmc_suspend_host,
>>
>> int mmc_suspend_host(struct mmc_host *host)
>> {
>> .....
>> err = mmc_cache_ctrl(host, 0);
>> }
>>
>> So, within mmc_suspend_host we are disabling the cache. But I do not
>> see a corresponding enabling of cache within mmc_resume_host. I
>> suggest we have either enabling of cache within mmc_resume_host or
>> within mmc_suspend_host, we replace mmc_cache_ctrl(host, 0) with the
>> flush operation, mmc_flush_cache(host->card).
>>
> Currently,
> Cache is enabled in mmc_init_card() during mmc_resume_host().
>
Thanks for your answer.
If mmc_card_keep_power is TRUE, then do you know why from mmc_resume
we call mmc_init_card instead of just mmc_awake which should reduce
some latency of system wakeup ?
> Thanks,
> Seungwon Jeon.
>>
>>
>> Regards
>> Saugata
>> --
>> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: Cache Control during mmc_suspend_host
2011-12-13 10:37 ` Saugata Das
@ 2011-12-14 4:34 ` Seungwon Jeon
2011-12-15 10:08 ` Saugata Das
0 siblings, 1 reply; 6+ messages in thread
From: Seungwon Jeon @ 2011-12-14 4:34 UTC (permalink / raw)
To: 'Saugata Das'; +Cc: linux-mmc
Saugata Das wrote:
> On 13 December 2011 11:57, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> > Hi Saugata,
> >
> > Saugata Das wrote:
> >> Hi Seungwon Jeon
> >>
> >> I see a small issue with the implementation mmc_suspend_host,
> >>
> >> int mmc_suspend_host(struct mmc_host *host)
> >> {
> >> .....
> >> err = mmc_cache_ctrl(host, 0);
> >> }
> >>
> >> So, within mmc_suspend_host we are disabling the cache. But I do not
> >> see a corresponding enabling of cache within mmc_resume_host. I
> >> suggest we have either enabling of cache within mmc_resume_host or
> >> within mmc_suspend_host, we replace mmc_cache_ctrl(host, 0) with the
> >> flush operation, mmc_flush_cache(host->card).
> >>
> > Currently,
> > Cache is enabled in mmc_init_card() during mmc_resume_host().
> >
> Thanks for your answer.
>
> If mmc_card_keep_power is TRUE, then do you know why from mmc_resume
> we call mmc_init_card instead of just mmc_awake which should reduce
> some latency of system wakeup ?
>
I didn't find that case of keeping the power
during sleep in mmc unlike sdio.
>
> > Thanks,
> > Seungwon Jeon.
> >>
> >>
> >> Regards
> >> Saugata
> >> --
> >> 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
> >
> --
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Cache Control during mmc_suspend_host
2011-12-14 4:34 ` Seungwon Jeon
@ 2011-12-15 10:08 ` Saugata Das
2011-12-16 8:50 ` Seungwon Jeon
0 siblings, 1 reply; 6+ messages in thread
From: Saugata Das @ 2011-12-15 10:08 UTC (permalink / raw)
To: Seungwon Jeon; +Cc: linux-mmc
On 14 December 2011 10:04, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> Saugata Das wrote:
>> On 13 December 2011 11:57, Seungwon Jeon <tgih.jun@samsung.com> wrote:
>> > Hi Saugata,
>> >
>> > Saugata Das wrote:
>> >> Hi Seungwon Jeon
>> >>
>> >> I see a small issue with the implementation mmc_suspend_host,
>> >>
>> >> int mmc_suspend_host(struct mmc_host *host)
>> >> {
>> >> .....
>> >> err = mmc_cache_ctrl(host, 0);
>> >> }
>> >>
>> >> So, within mmc_suspend_host we are disabling the cache. But I do not
>> >> see a corresponding enabling of cache within mmc_resume_host. I
>> >> suggest we have either enabling of cache within mmc_resume_host or
>> >> within mmc_suspend_host, we replace mmc_cache_ctrl(host, 0) with the
>> >> flush operation, mmc_flush_cache(host->card).
>> >>
>> > Currently,
>> > Cache is enabled in mmc_init_card() during mmc_resume_host().
>> >
>> Thanks for your answer.
>>
>> If mmc_card_keep_power is TRUE, then do you know why from mmc_resume
>> we call mmc_init_card instead of just mmc_awake which should reduce
>> some latency of system wakeup ?
>>
> I didn't find that case of keeping the power
> during sleep in mmc unlike sdio.
I am talking about keeping VCCQ ON and switching OFF only VCC. This is
normally the SLEEP mode of eMMC, which provides quicker wakeup or
resume. Some platforms will like to have quicker resume and will like
to avoid doing a mmc_init_card during resume. If that happens, then
the cache control disabling from mmc_suspend_host will be a problem.
So, I suggest we change that to mmc_flush_cache which logically does
the same as you wanted but it is also future proof.
>
>>
>> > Thanks,
>> > Seungwon Jeon.
>> >>
>> >>
>> >> Regards
>> >> Saugata
>> >> --
>> >> 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
>> >
>> --
>> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: Cache Control during mmc_suspend_host
2011-12-15 10:08 ` Saugata Das
@ 2011-12-16 8:50 ` Seungwon Jeon
0 siblings, 0 replies; 6+ messages in thread
From: Seungwon Jeon @ 2011-12-16 8:50 UTC (permalink / raw)
To: 'Saugata Das'; +Cc: linux-mmc
Saugata Das wrote:
> On 14 December 2011 10:04, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> > Saugata Das wrote:
> >> On 13 December 2011 11:57, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> >> > Hi Saugata,
> >> >
> >> > Saugata Das wrote:
> >> >> Hi Seungwon Jeon
> >> >>
> >> >> I see a small issue with the implementation mmc_suspend_host,
> >> >>
> >> >> int mmc_suspend_host(struct mmc_host *host)
> >> >> {
> >> >> .....
> >> >> err = mmc_cache_ctrl(host, 0);
> >> >> }
> >> >>
> >> >> So, within mmc_suspend_host we are disabling the cache. But I do not
> >> >> see a corresponding enabling of cache within mmc_resume_host. I
> >> >> suggest we have either enabling of cache within mmc_resume_host or
> >> >> within mmc_suspend_host, we replace mmc_cache_ctrl(host, 0) with the
> >> >> flush operation, mmc_flush_cache(host->card).
> >> >>
> >> > Currently,
> >> > Cache is enabled in mmc_init_card() during mmc_resume_host().
> >> >
> >> Thanks for your answer.
> >>
> >> If mmc_card_keep_power is TRUE, then do you know why from mmc_resume
> >> we call mmc_init_card instead of just mmc_awake which should reduce
> >> some latency of system wakeup ?
> >>
> > I didn't find that case of keeping the power
> > during sleep in mmc unlike sdio.
>
> I am talking about keeping VCCQ ON and switching OFF only VCC. This is
> normally the SLEEP mode of eMMC, which provides quicker wakeup or
> resume. Some platforms will like to have quicker resume and will like
> to avoid doing a mmc_init_card during resume. If that happens, then
> the cache control disabling from mmc_suspend_host will be a problem.
> So, I suggest we change that to mmc_flush_cache which logically does
> the same as you wanted but it is also future proof.
Yes.
Currently mmc can wake up from sleep state using only CMD0 in mmc_init_card.
If we separate the escape route from sleep state, it must be considered.
Thank you for suggestion.
>
> >
> >>
> >> > Thanks,
> >> > Seungwon Jeon.
> >> >>
> >> >>
> >> >> Regards
> >> >> Saugata
> >> >> --
> >> >> 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
> >> >
> >> --
> >> 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
> >
> --
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-12-16 8:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-13 5:02 Cache Control during mmc_suspend_host Saugata Das
2011-12-13 6:27 ` Seungwon Jeon
2011-12-13 10:37 ` Saugata Das
2011-12-14 4:34 ` Seungwon Jeon
2011-12-15 10:08 ` Saugata Das
2011-12-16 8:50 ` Seungwon Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox