From: Simon Horman <horms@verge.net.au>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-mmc@vger.kernel.org,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
linux-sh@vger.kernel.org
Subject: Re: [PATCH] mmc: sh_mmcif: Support MMC_SLEEP_AWAKE command
Date: Wed, 20 Jun 2012 06:42:38 +0000 [thread overview]
Message-ID: <20120620064238.GH20030@verge.net.au> (raw)
In-Reply-To: <47844351.ibBFGBYgKQ@avalon>
On Wed, Jun 13, 2012 at 09:39:56AM +0200, Laurent Pinchart wrote:
> Hi Simon,
>
> On Wednesday 13 June 2012 10:12:01 Simon Horman wrote:
> > On Tue, Jun 12, 2012 at 10:56:09PM +0200, Laurent Pinchart wrote:
> > > The MMC_SLEEP_AWAKE and SD_IO_SEND_OP_COND commands share the same
> > > opcode. SD_IO_SEND_OP_COND isn't supported by the SH MMCIF, but
> > > MMC_SLEEP_AWAKE is. Discriminate between the two commands using the
> > > command flags, and reject SD_IO_SEND_OP_COND only.
> > >
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > ---
> > >
> > > drivers/mmc/host/sh_mmcif.c | 14 ++++----------
> > > 1 files changed, 4 insertions(+), 10 deletions(-)
> > >
> > > Not supporting the MMC_SLEEP_AWAKE command makes system suspend fail if an
> > > MMC or eMMC device supporting sleep/wake is connected. The issue has been
> > > first noticed on the Armadillo 800 EVA board.
> >
> > Hi Laurent,
> >
> > Do you have a test-case for this?
>
> echo mem > /sys/power/state on Armadillo 800 EVA was my test case. It failed
> without the patch, and succeeds with it.
I'm not having much luck with or without your patch.
# echo mem > /sys/power/state
echo: write error: No such device
I am using 3.5-rc3. With the armadillo default config + EXT3 + SUSPEND.
Perhaps I am missing some options?
> > Also, did you check to make sure that the Mackerel still works?
>
> Yes it still works. However, I have no way to test the MMC_SLEEP_AWAKE command
> on the Mackerel board, as my MMC card doesn't support it (on the Armadillo the
> eMMC chip supports the MMC_SLEEP_AWAKE command).
>
> BTW, I wonder whether the current implementation is really the best one. If
> the hardware doesn't support SD/SDIO commands, instead of intercepting
> commands and rejecting the ones used by SD/SDIO at probe time, wouldn't it be
> better for host drivers to tell that they don't support SD and/or SDIO using
> flags in the mmc_host structure ?
I don't have any strong thoughts on this but your approach
does sound interesting.
next prev parent reply other threads:[~2012-06-20 6:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-12 20:56 [PATCH] mmc: sh_mmcif: Support MMC_SLEEP_AWAKE command Laurent Pinchart
2012-06-13 1:12 ` Simon Horman
2012-06-13 7:39 ` Laurent Pinchart
2012-06-20 6:42 ` Simon Horman [this message]
2012-06-20 10:51 ` Laurent Pinchart
2012-06-13 13:27 ` Guennadi Liakhovetski
2012-06-20 6:21 ` Chris Ball
2012-06-20 11:54 ` Ulf Hansson
2012-06-20 13:06 ` Laurent Pinchart
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=20120620064238.GH20030@verge.net.au \
--to=horms@verge.net.au \
--cc=g.liakhovetski@gmx.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).