lkml.org 
[lkml]   [2004]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/3] MMC compatibility fix - GO_IDLE
This patch adds a GO_IDLE before sending a new SEND_OP_COND (as required 
by MMC standard).
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.
\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.044 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site