* [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend @ 2011-07-13 14:36 Balaji T K 2011-07-14 14:05 ` Subhash Jadavani 2011-07-19 16:01 ` S, Venkatraman 0 siblings, 2 replies; 6+ messages in thread From: Balaji T K @ 2011-07-13 14:36 UTC (permalink / raw) To: linux-mmc; +Cc: Balaji T K Put MMC to sleep if it supports SLEEP/AWAKE (CMD5) in the mmc suspend to minimize power consumption. Signed-off-by: Balaji T K <balajitk@ti.com> --- drivers/mmc/core/mmc.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index afabdc3..e8dfcde 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -900,16 +900,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; } /* -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend 2011-07-13 14:36 [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend Balaji T K @ 2011-07-14 14:05 ` Subhash Jadavani 2011-07-19 16:01 ` S, Venkatraman 1 sibling, 0 replies; 6+ messages in thread From: Subhash Jadavani @ 2011-07-14 14:05 UTC (permalink / raw) To: 'Balaji T K', linux-mmc Balaji, Tried this patch along with disabling the eMMC VCC supply in suspend and it works !!! Without this patch, if I disabled the VCC supply then after resume I/O errors are seen. This change also complies with eMMC spec so am ok with this change. Regards, Subhash -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. > -----Original Message----- > From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc- > owner@vger.kernel.org] On Behalf Of Balaji T K > Sent: Wednesday, July 13, 2011 8:06 PM > To: linux-mmc@vger.kernel.org > Cc: Balaji T K > Subject: [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend > > Put MMC to sleep if it supports SLEEP/AWAKE (CMD5) > in the mmc suspend to minimize power consumption. > > Signed-off-by: Balaji T K <balajitk@ti.com> > --- > drivers/mmc/core/mmc.c | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c > index afabdc3..e8dfcde 100644 > --- a/drivers/mmc/core/mmc.c > +++ b/drivers/mmc/core/mmc.c > @@ -900,16 +900,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; > } > > /* > -- > 1.7.0.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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend 2011-07-13 14:36 [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend Balaji T K 2011-07-14 14:05 ` Subhash Jadavani @ 2011-07-19 16:01 ` S, Venkatraman 2011-07-19 16:48 ` Chris Ball 1 sibling, 1 reply; 6+ messages in thread From: S, Venkatraman @ 2011-07-19 16:01 UTC (permalink / raw) To: Balaji T K; +Cc: linux-mmc On Wed, Jul 13, 2011 at 8:06 PM, Balaji T K <balajitk@ti.com> wrote: > Put MMC to sleep if it supports SLEEP/AWAKE (CMD5) > in the mmc suspend to minimize power consumption. > > Signed-off-by: Balaji T K <balajitk@ti.com> > --- > drivers/mmc/core/mmc.c | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c > index afabdc3..e8dfcde 100644 > --- a/drivers/mmc/core/mmc.c > +++ b/drivers/mmc/core/mmc.c > @@ -900,16 +900,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; > } > > /* > -- > 1.7.0.4 > Balaji, Would you mind reposting the patch without the RFC and s/CORE/core in subject line ? You can add my Acked-by: Venkatraman S <svenkatr@ti.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend 2011-07-19 16:01 ` S, Venkatraman @ 2011-07-19 16:48 ` Chris Ball 2011-07-21 20:12 ` Adrian Hunter 0 siblings, 1 reply; 6+ messages in thread From: Chris Ball @ 2011-07-19 16:48 UTC (permalink / raw) To: S, Venkatraman; +Cc: Balaji T K, linux-mmc Hi, On Tue, Jul 19 2011, S, Venkatraman wrote: > On Wed, Jul 13, 2011 at 8:06 PM, Balaji T K <balajitk@ti.com> wrote: >> Put MMC to sleep if it supports SLEEP/AWAKE (CMD5) >> in the mmc suspend to minimize power consumption. >> >> Signed-off-by: Balaji T K <balajitk@ti.com> > > Balaji, > Would you mind reposting the patch without the RFC and s/CORE/core > in subject line ? > You can add my > Acked-by: Venkatraman S <svenkatr@ti.com> No need to resend, thanks -- pushed to mmc-next with these changes and the ACK. Anyone object to letting this soak in mmc-next for a release and merging it in 3.2? I'm worried that we'll find card or host quirks around this, and the 3.0 release is probably happening today. - Chris. -- Chris Ball <cjb@laptop.org> <http://printf.net/> One Laptop Per Child ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend 2011-07-19 16:48 ` Chris Ball @ 2011-07-21 20:12 ` Adrian Hunter 2011-09-08 16:01 ` T Krishnamoorthy, Balaji 0 siblings, 1 reply; 6+ messages in thread From: Adrian Hunter @ 2011-07-21 20:12 UTC (permalink / raw) To: Chris Ball; +Cc: S, Venkatraman, Balaji T K, linux-mmc, Adrian Hunter On 19/07/2011 7:48 p.m., Chris Ball wrote: > Hi, > > On Tue, Jul 19 2011, S, Venkatraman wrote: >> On Wed, Jul 13, 2011 at 8:06 PM, Balaji T K<balajitk@ti.com> wrote: >>> Put MMC to sleep if it supports SLEEP/AWAKE (CMD5) >>> in the mmc suspend to minimize power consumption. >>> >>> Signed-off-by: Balaji T K<balajitk@ti.com> >> Balaji, >> Would you mind reposting the patch without the RFC and s/CORE/core >> in subject line ? >> You can add my >> Acked-by: Venkatraman S<svenkatr@ti.com> > No need to resend, thanks -- pushed to mmc-next with these changes and > the ACK. > > Anyone object to letting this soak in mmc-next for a release and merging > it in 3.2? I'm worried that we'll find card or host quirks around this, > and the 3.0 release is probably happening today. eMMC often have VccQ (logic) always on (or sharing the same power as SDRAM which comes to the same thing), but can switch off Vcc (NAND core). However, turning off Vcc without first putting the card to sleep can result in errors i.e. you are not allowed to do it. This patch seems to be covering the "VccQ always on" case but relies on CMD0 to wake up the card. If that is what is going on, then some comments to that effect are needed, including within mmc_init_card to note that mmc_go_idle is needed for cards that are asleep - if that is, in fact, correct. Also, wouldn't it be nice to wake up the card with CMD5 which should be much faster than re-initialising? > - Chris. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend 2011-07-21 20:12 ` Adrian Hunter @ 2011-09-08 16:01 ` T Krishnamoorthy, Balaji 0 siblings, 0 replies; 6+ messages in thread From: T Krishnamoorthy, Balaji @ 2011-09-08 16:01 UTC (permalink / raw) To: Adrian Hunter; +Cc: Chris Ball, S, Venkatraman, linux-mmc On Fri, Jul 22, 2011 at 1:42 AM, Adrian Hunter <adrian.hunter@intel.com> wrote: > On 19/07/2011 7:48 p.m., Chris Ball wrote: >> >> Hi, >> >> On Tue, Jul 19 2011, S, Venkatraman wrote: >>> >>> On Wed, Jul 13, 2011 at 8:06 PM, Balaji T K<balajitk@ti.com> wrote: >>>> >>>> Put MMC to sleep if it supports SLEEP/AWAKE (CMD5) >>>> in the mmc suspend to minimize power consumption. >>>> >>>> Signed-off-by: Balaji T K<balajitk@ti.com> >>> >>> Balaji, >>> Would you mind reposting the patch without the RFC and s/CORE/core >>> in subject line ? >>> You can add my >>> Acked-by: Venkatraman S<svenkatr@ti.com> >> >> No need to resend, thanks -- pushed to mmc-next with these changes and >> the ACK. >> >> Anyone object to letting this soak in mmc-next for a release and merging >> it in 3.2? I'm worried that we'll find card or host quirks around this, >> and the 3.0 release is probably happening today. > > eMMC often have VccQ (logic) always on (or sharing the same power as SDRAM > which comes to the same thing), but can switch off Vcc (NAND core). > However, turning off Vcc without first putting the card to sleep can result > in errors i.e. you are not allowed to do it. > > This patch seems to be covering the "VccQ always on" case but relies on CMD0 > to wake up the card. > > If that is what is going on, then some comments to that effect are needed, > including within mmc_init_card to note that mmc_go_idle is needed for cards > that are asleep - if that is, in fact, correct. Yes, current implementation depends on CMD0 in mmc_init_card to wakeup. Specification allows eMMC card in sleep to respond to CMD0/CMD5 Will send an updated patch with comments added. > > Also, wouldn't it be nice to wake up the card with CMD5 which should be much > faster than re-initialising? > >> - Chris. > > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-08 23:06 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-07-13 14:36 [RFC/RFT] MMC: CORE: eMMC in Sleep mode before suspend Balaji T K 2011-07-14 14:05 ` Subhash Jadavani 2011-07-19 16:01 ` S, Venkatraman 2011-07-19 16:48 ` Chris Ball 2011-07-21 20:12 ` Adrian Hunter 2011-09-08 16:01 ` T Krishnamoorthy, Balaji
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.