public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: core: add comment why sdio_reset is done at init time
@ 2011-02-14  7:12 Philip Rakity
  2011-02-24 18:41 ` Chris Ball
  0 siblings, 1 reply; 2+ messages in thread
From: Philip Rakity @ 2011-02-14  7:12 UTC (permalink / raw)
  To: linux-mmc@vger.kernel.org; +Cc: Mark Brown


sdio_reset sends a CMD52 to reset the sdio card.  This is
highly recommended for sdio cards being reinitialized.  Since
we do not know if the card is being reinitialized we just send
the command.  SD/eMMC cards are supposed to ignore the CMD
before the CMD0.  Document why we are doing this.

Signed-off-by: Philip Rakity <prakity@marvell.com>
---
 drivers/mmc/core/core.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 34a7e8c..d9fb0d3 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1494,6 +1494,12 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
 		mmc_hostname(host), __func__, host->f_init);
 #endif
 	mmc_power_up(host);
+
+	/*
+	 * sdio_reset sends CMD52 to reset card.  Since we do not know
+	 * if the card is being re-initialzed just send it.  CMD52
+	 * should be ignored by SD/eMMC cards
+	 */
 	sdio_reset(host);
 	mmc_go_idle(host);
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-24 18:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-14  7:12 [PATCH] mmc: core: add comment why sdio_reset is done at init time Philip Rakity
2011-02-24 18:41 ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox