mmc: Correct definition of R6
authorPhilip Langdale <philipl@overt.org>
Thu, 4 Jan 2007 15:04:47 +0000 (07:04 -0800)
committerPierre Ossman <drzeus@drzeus.cx>
Mon, 15 Jan 2007 05:44:03 +0000 (06:44 +0100)
During development of SDHC support, it was discovered that the definition
for R6 was incorrect. This patch fixes that and patches the drivers that
do switch on the response type.

Signed-off-by: Philip Langdale <philipl@overt.org>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: Pavel Pisa <ppisa@pikron.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/imxmmc.c
drivers/mmc/omap.c
drivers/mmc/pxamci.c
drivers/mmc/tifm_sd.c
include/linux/mmc/mmc.h

index 06e7fcd192217317bef3d0159c5823144ca6619a..bfb9ff693208fa51c81667622a699cd5748916c0 100644 (file)
@@ -351,9 +351,6 @@ static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd,
        case MMC_RSP_R3: /* short */
                cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R3;
                break;
-       case MMC_RSP_R6: /* short CRC */
-               cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R6;
-               break;
        default:
                break;
        }
index 1e5407d44dfd5610aa3e3ce1546cf01c62b12b56..d30540b2761420cff6bf445f761b8d0b27b34b40 100644 (file)
@@ -208,7 +208,7 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd)
                break;
        case MMC_RSP_R1:
        case MMC_RSP_R1B:
-               /* resp 1, resp 1b */
+               /* resp 1, 1b, 6, 7 */
                resptype = 1;
                break;
        case MMC_RSP_R2:
@@ -217,9 +217,6 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd)
        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;
index 45a9283ce4988784cc231c069350488f3b693d21..6073d998b11f3ee1164d3209be639a21ba640be3 100644 (file)
@@ -171,7 +171,7 @@ static void pxamci_start_cmd(struct pxamci_host *host, struct mmc_command *cmd,
 
 #define RSP_TYPE(x)    ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE))
        switch (RSP_TYPE(mmc_resp_type(cmd))) {
-       case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6 */
+       case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6, r7 */
                cmdat |= CMDAT_RESP_SHORT;
                break;
        case RSP_TYPE(MMC_RSP_R3):
index f18ad998b3cb05bf85925b83802c608dbfc899a1..fa4a52886b97c9a358eab60cca56c05b5cd219fa 100644 (file)
@@ -173,9 +173,6 @@ static unsigned int tifm_sd_op_flags(struct mmc_command *cmd)
        case MMC_RSP_R3:
                rc |= TIFM_MMCSD_RSP_R3;
                break;
-       case MMC_RSP_R6:
-               rc |= TIFM_MMCSD_RSP_R6;
-               break;
        default:
                BUG();
        }
index a3594dfd696399ae8609417cafdc1f0ca844272a..bcf24909d67730ca79f416b4bfa0b2875939fdd5 100644 (file)
@@ -42,7 +42,7 @@ struct mmc_command {
 #define MMC_RSP_R1B    (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
 #define MMC_RSP_R2     (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
 #define MMC_RSP_R3     (MMC_RSP_PRESENT)
-#define MMC_RSP_R6     (MMC_RSP_PRESENT|MMC_RSP_CRC)
+#define MMC_RSP_R6     (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
 
 #define mmc_resp_type(cmd)     ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE))