]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mmc/omap.c
[NET]: Fix compat_sock_common_getsockopt typo.
[linux-2.6-omap-h63xx.git] / drivers / mmc / omap.c
index 9488408308fb91656682e4232e943ba964ab1138..1e96a2f65022eee03e234b14bae7e92fb0c30c02 100644 (file)
@@ -91,7 +91,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 */
@@ -204,18 +203,22 @@ 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):
-               /* resp 1, resp 1b */
+       switch (mmc_resp_type(cmd)) {
+       case MMC_RSP_NONE:
+               break;
+       case MMC_RSP_R1:
+       case MMC_RSP_R1B:
+               /* resp 1, 1b, 6, 7 */
                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;
        default:
+               dev_err(mmc_dev(host->mmc), "Invalid response type: %04x\n", mmc_resp_type(cmd));
                break;
        }
 
@@ -1096,8 +1099,10 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
         */
        mmc->max_phys_segs = 32;
        mmc->max_hw_segs = 32;
-       mmc->max_sectors = 256; /* NBLK max 11-bits, OMAP also limited by DMA */
-       mmc->max_seg_size = mmc->max_sectors * 512;
+       mmc->max_blk_size = 2048;       /* BLEN is 11 bits (+1) */
+       mmc->max_blk_count = 2048;      /* NBLK is 11 bits (+1) */
+       mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
+       mmc->max_seg_size = mmc->max_req_size;
 
        if (host->power_pin >= 0) {
                if ((ret = omap_request_gpio(host->power_pin)) != 0) {