From: Pierre Tardy <tardyp@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/1] MMC: SDIO card reset support for Intel Moorestown platform
Date: Mon, 22 Jun 2009 15:03:17 +0000 (UTC) [thread overview]
Message-ID: <loom.20090622T144530-979@post.gmane.org> (raw)
In-Reply-To: <95608CFE3D0C064B8468DB61F8403BE036C19F9ECE@PDSMSX501.ccr.corp.intel.com>
Li, Jiebing <jiebing.li <at> intel.com> writes:
>
> Hi Pierre and all,
>
> Here's a SDIO driver code patch which implements SDIO card reset support for
device driver to recover the
> card to the normal status in case that error occurs.
Another case that may need to be addressed is sdio reset in the scan sequence.
On some HC board, the sdio power survives upon board reset. A previously
initialised SD card will stay in IORDY mode, and wont answer to CMD5.
Though, a reset cmd52 should be sent before or after cmd0 in case of a io card
is still initialised from a previous boot.
One problem here is that mmc_io_rw_direct needs a struct mmc_card *, which is
not yet available in mmc_rescan().
I have a Q&D mmc_io_reset implementation, which works, but rely on
mmc_io_rw_direct implementation only to use card->host.
int mmc_io_reset(struct mmc_host *host)
{
struct mmc_card card;
u8 reg;
int ret;
card.host = host;
// not sure if we really need to read and modify.
// Reset wont reset the other bits anyway?
ret = mmc_io_rw_direct(&card, 0, 0, SDIO_CCCR_ABORT, 0, ®);
if (ret)
reg = 0x08;
else
reg |= 0x08;
return mmc_io_rw_direct(&card, 1, 0, SDIO_CCCR_ABORT, reg, NULL);
}
Any idea on how to deal with this situation correctly?
prev parent reply other threads:[~2009-06-22 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-16 11:18 Li, Jiebing
2009-06-22 15:03 ` Pierre Tardy [this message]
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=loom.20090622T144530-979@post.gmane.org \
--to=tardyp@gmail.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®