public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos Aguiar <carlos.aguiar@indt.org.br>
To: Tony Lindgren <tony@atomide.com>,
	Juha Yrjola <juha.yrjola@solidboot.com>,
	Pierre Ossman <drzeus-list@drzeus.cx>,
	linux-omap-open-source@linux.omap.com
Cc: Ilias Biris <ilias.biris@indt.org.br>
Subject: [RFC][PATCH] Update MMC response types
Date: Mon, 18 Dec 2006 11:34:34 -0400	[thread overview]
Message-ID: <4586B50A.9030700@indt.org.br> (raw)

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



             reply	other threads:[~2006-12-18 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-18 15:34 Carlos Aguiar [this message]
     [not found] ` <4586D996.40009@drzeus.cx>
2007-01-09 23:56   ` [RFC][PATCH] Update MMC response types Tony Lindgren
2007-01-10  5:46     ` Pierre Ossman
2007-01-15  5:35 ` 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=4586B50A.9030700@indt.org.br \
    --to=carlos.aguiar@indt.org.br \
    --cc=drzeus-list@drzeus.cx \
    --cc=ilias.biris@indt.org.br \
    --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