All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Balaji T K <balajitk@ti.com>
Cc: linux-mmc@vger.kernel.org, subhashj@codeaurora.org,
	adrian.hunter@intel.com, Venkatraman S <svenkatr@ti.com>,
	Jarkko Lavinen <jarkko.lavinen@nokia.com>
Subject: Re: [PATCH v2] mmc: core: eMMC in Sleep mode before suspend
Date: Thu, 12 Apr 2012 00:24:12 -0400	[thread overview]
Message-ID: <87wr5lr30z.fsf@laptop.org> (raw)
In-Reply-To: <1315499919-804-1-git-send-email-balajitk@ti.com> (Balaji T. K.'s message of "Thu, 8 Sep 2011 22:08:39 +0530")

Hi,

On Thu, Sep 08 2011, Balaji T K wrote:
> 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>

I've just tried this on an eMMC 4.41 device (Sandisk SEM04G) with
sdhci-pxav3, and it resulted in a crash on the way into suspend:

[   18.379192] PM: Syncing filesystems ... done.
[   18.423866] Freezing user space processes ... (elapsed 0.01 seconds) done.
[   18.446542] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[   18.549586] PM: Device sdhci-pxav3.2 failed to suspend: error -110
[   18.583808] PM: Some devices failed to suspend
[   22.141284] mmcblk0: error -110 sending status command, retrying
[   22.153150] mmcblk0: error -110 sending status command, retrying
[   22.164708] mmcblk0: error -110 sending status command, aborting
[   22.176097] end_request: I/O error, dev mmcblk0, sector 4430104
[..]

Digging down, the -110 is coming from:

int mmc_card_sleepawake(struct mmc_host *host, int sleep)
{
        struct mmc_command cmd = {0};
        struct mmc_card *card = host->card;
        int err;

        if (sleep)
                mmc_deselect_cards(host);

        cmd.opcode = MMC_SLEEP_AWAKE;
        cmd.arg = card->rca << 16;
        if (sleep)
                cmd.arg |= 1 << 15;

        cmd.flags = MMC_RSP_R1B | MMC_CMD_AC;
        err = mmc_wait_for_cmd(host, &cmd, 0);
        if (err)
                return err;
        [..]

Has anyone tried sleepawake on an SEM04G before?

It seems likely (I haven't tested yet, but will do) that the card
actually went into sleep successfully and is waiting for an AWAKE
command, even though mmc_wait_for_cmd() returned a timeout.
If so, any suggestions on how to handle that case?

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  parent reply	other threads:[~2012-04-12  4:24 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
2011-09-21 17:47 ` Chris Ball
2012-04-12  4:24 ` Chris Ball [this message]
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=87wr5lr30z.fsf@laptop.org \
    --to=cjb@laptop.org \
    --cc=adrian.hunter@intel.com \
    --cc=balajitk@ti.com \
    --cc=jarkko.lavinen@nokia.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=subhashj@codeaurora.org \
    --cc=svenkatr@ti.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.