public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MMC: OMAP R6 response support
@ 2007-01-25 13:55 Carlos Aguiar
  2007-01-25 15:19 ` Pierre Ossman
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos Aguiar @ 2007-01-25 13:55 UTC (permalink / raw)
  To: Pierre Ossman, Tony Lindgren, Juha Yrjola,
	linux- >> omap-linux

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



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

end of thread, other threads:[~2007-01-25 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-25 13:55 [PATCH] MMC: OMAP R6 response support Carlos Aguiar
2007-01-25 15:19 ` Pierre Ossman

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