public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] MMC compatibility fix - GO_IDLE
@ 2004-09-18  9:56 Pierre Ossman
  2004-09-22 14:17 ` Russell King
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Ossman @ 2004-09-18  9:56 UTC (permalink / raw)
  To: linux-kernel, Russell King

[-- Attachment #1: Type: text/plain, Size: 92 bytes --]

This patch adds a GO_IDLE before sending a new SEND_OP_COND (as required 
by MMC standard).

[-- Attachment #2: mmc-goidle.patch --]
[-- Type: text/x-patch, Size: 735 bytes --]

Index: linux-wbsd/drivers/mmc/mmc.c
===================================================================
--- linux-wbsd/drivers/mmc/mmc.c	(revision 57)
+++ linux-wbsd/drivers/mmc/mmc.c	(revision 58)
@@ -579,6 +579,8 @@
 
 static void mmc_setup(struct mmc_host *host)
 {
+	struct mmc_command cmd;
+	
 	if (host->ios.power_mode != MMC_POWER_ON) {
 		int err;
 		u32 ocr;
@@ -613,6 +615,16 @@
 	if (host->ocr == 0)
 		return;
 
+	/* Put cards in idle before sending new OCR */
+
+	cmd.opcode = MMC_GO_IDLE_STATE;
+	cmd.arg = 0;
+	cmd.flags = MMC_RSP_NONE;
+	
+	mmc_wait_for_cmd(host, &cmd, 0);
+
+	mmc_delay(1);
+	
 	/*
 	 * Send the selected OCR multiple times... until the cards
 	 * all get the idea that they should be ready for CMD2.

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

end of thread, other threads:[~2004-09-22 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-18  9:56 [PATCH 1/3] MMC compatibility fix - GO_IDLE Pierre Ossman
2004-09-22 14:17 ` Russell King
2004-09-22 17:45   ` Pierre Ossman
2004-09-22 19:15     ` Russell King

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