[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <loom.20090622T144530-979@post.gmane.org>
Date: Mon, 22 Jun 2009 15:03:17 +0000 (UTC)
From: Pierre Tardy <tardyp@...il.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/1] MMC: SDIO card reset support for Intel Moorestown platform
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists