public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] Update MMC response types
@ 2006-12-18 15:34 Carlos Aguiar
       [not found] ` <4586D996.40009@drzeus.cx>
  2007-01-15  5:35 ` Pierre Ossman
  0 siblings, 2 replies; 4+ messages in thread
From: Carlos Aguiar @ 2006-12-18 15:34 UTC (permalink / raw)
  To: Tony Lindgren, Juha Yrjola, Pierre Ossman, linux-omap-open-source
  Cc: Ilias Biris

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

Hi folks,

This patch is a fix in order to update MMC response types. This modification
is needed to allow SD card support in OMAP platforms.

It's based on previously work from Juha Yrjola.

This modification was tested in H2 and H3 OMAP platforms using an
Transcend SD card 512MB.

BR,

Carlos.

-- 
Carlos Eduardo
Software Engineer
Nokia Institute of Technology - INdT
Open Source Mobile Research Center - OSMRC
Phone: +55 92 2126-1079
Mobile: +55 92 8127-1797
E-mail: carlos.aguiar@indt.org.br


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

This patch is a fix in order to update MMC response types. This modification is 
needed to allow SD card support on OMAP platforms.

Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Signed-off-by: Yuha Yrjola <juha.yrjola@solidboot.com>

Index: linux-omap-git/drivers/mmc/omap.c
===================================================================
--- linux-omap-git.orig/drivers/mmc/omap.c	2006-11-24 09:45:44.000000000 -0400
+++ linux-omap-git/drivers/mmc/omap.c	2006-12-18 06:02:53.000000000 -0400
@@ -92,7 +92,6 @@
 
 
 #define DRIVER_NAME "mmci-omap"
-#define RSP_TYPE(x)	((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE))
 
 /* Specifies how often in millisecs to poll for card status changes
  * when the cover switch is open */
@@ -205,18 +204,25 @@ mmc_omap_start_command(struct mmc_omap_h
 	cmdtype = 0;
 
 	/* Our hardware needs to know exact type */
-	switch (RSP_TYPE(mmc_resp_type(cmd))) {
-	case RSP_TYPE(MMC_RSP_R1):
+	switch (mmc_resp_type(cmd)) {
+	case MMC_RSP_NONE:
+		break;
+	case MMC_RSP_R1:
+	case MMC_RSP_R1B:
 		/* resp 1, resp 1b */
 		resptype = 1;
 		break;
-	case RSP_TYPE(MMC_RSP_R2):
+	case MMC_RSP_R2:
 		resptype = 2;
 		break;
-	case RSP_TYPE(MMC_RSP_R3):
+	case MMC_RSP_R3:
 		resptype = 3;
 		break;
+	case MMC_RSP_R6:
+		resptype = 6;
+		break;
 	default:
+		dev_err(mmc_dev(host->mmc), "Invalid response type: %04x\n", mmc_resp_type(cmd));
 		break;
 	}
 

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



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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-18 15:34 [RFC][PATCH] Update MMC response types Carlos Aguiar
     [not found] ` <4586D996.40009@drzeus.cx>
2007-01-09 23:56   ` Tony Lindgren
2007-01-10  5:46     ` Pierre Ossman
2007-01-15  5:35 ` Pierre Ossman

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