public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus-list@drzeus.cx>
To: linux-kernel@vger.kernel.org, Russell King <rmk+lkml@arm.linux.org.uk>
Subject: [PATCH 1/3] MMC compatibility fix - GO_IDLE
Date: Sat, 18 Sep 2004 11:56:42 +0200	[thread overview]
Message-ID: <414C065A.7000602@drzeus.cx> (raw)

[-- 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.

             reply	other threads:[~2004-09-18  9:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-18  9:56 Pierre Ossman [this message]
2004-09-22 14:17 ` [PATCH 1/3] MMC compatibility fix - GO_IDLE Russell King
2004-09-22 17:45   ` Pierre Ossman
2004-09-22 19:15     ` Russell King

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=414C065A.7000602@drzeus.cx \
    --to=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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