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 <balaj...@ti.com>
> Acked-by: Venkatraman S <svenk...@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   <c...@laptop.org>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to