public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos Aguiar <carlos.aguiar@indt.org.br>
To: Pierre Ossman <drzeus-list@drzeus.cx>,
	Tony Lindgren <tony@atomide.com>,
	Juha Yrjola <juha.yrjola@solidboot.com>,
	"linux- >> omap-linux" <linux-omap-open-source@linux.omap.com>
Subject: [PATCH] MMC: OMAP R6 response support
Date: Thu, 25 Jan 2007 09:55:37 -0400	[thread overview]
Message-ID: <45B8B6D9.90006@indt.org.br> (raw)

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

Hi folks,

Regarding the commit below

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6f949909e8f9e5d7e5584dc48d9a5e060c52aed1
,

the definition of response type R6 is the same as R1 and case
MMC_RSP_R6 was removed on omap.c, causing a error when inserting a SD
card on OMAP platforms.

This error occur due following the MMC and SD specs, on CMD3, response
type is R6 to SD cards and R1 to MMC cards.

So, I'm proposing a patch that try to solve this problem. I've tested
it with SD and MMC cards and looks fine.

Please, comments and suggestions are welcome.

BR,

Carlos.

-- 
Carlos Eduardo
Nokia Institute of Technology - INdT
Open Source Mobile Research Center - OSMRC
E-mail: carlos.aguiar@indt.org.br


[-- Attachment #2: omap_r6.diff --]
[-- Type: text/plain, Size: 756 bytes --]

On CMD3, response type is R6 to SD cards and R1 to MMC cards.

Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>

Index: linux-omap/drivers/mmc/omap.c
===================================================================
--- linux-omap.orig/drivers/mmc/omap.c	2007-01-24 16:02:58.000000000 -0400
+++ linux-omap/drivers/mmc/omap.c	2007-01-25 09:31:40.000000000 -0400
@@ -209,8 +209,13 @@ mmc_omap_start_command(struct mmc_omap_h
 		break;
 	case MMC_RSP_R1:
 	case MMC_RSP_R1B:
-		/* resp 1, resp 1b */
-		resptype = 1;
+		if ((host->mmc->mode == MMC_MODE_SD) &&
+			(host->cmd->opcode == SD_SEND_RELATIVE_ADDR))
+			/* resp 6 */
+			resptype = 6;
+		else
+			/* resp 1, 1b, 7 */
+			resptype = 1;
 		break;
 	case MMC_RSP_R2:
 		resptype = 2;

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



             reply	other threads:[~2007-01-25 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25 13:55 Carlos Aguiar [this message]
2007-01-25 15:19 ` [PATCH] MMC: OMAP R6 response support Pierre Ossman

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=45B8B6D9.90006@indt.org.br \
    --to=carlos.aguiar@indt.org.br \
    --cc=drzeus-list@drzeus.cx \
    --cc=juha.yrjola@solidboot.com \
    --cc=linux-omap-open-source@linux.omap.com \
    --cc=tony@atomide.com \
    /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