]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
MMC: Update omap response types
authorCarlos Aguiar <carlos.aguiar@indt.org.br>
Tue, 9 Jan 2007 23:54:46 +0000 (15:54 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 9 Jan 2007 23:54:46 +0000 (15:54 -0800)
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: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/mmc/omap.c

index 0d4379a6540b1c068ef02c358a51b984bb2076af..594d28bcdab31eccada3f98a177c3db5bb1c840b 100644 (file)
@@ -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_host *host, struct mmc_command *cmd)
        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;
        }