Revert "mmc: sd: Add new CONFIG_MMC_PARANOID_SD_INIT for enabling retries during...
author黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:53:30 +0000 (22:53 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:53:30 +0000 (22:53 +0800)
This reverts commit ed6df5648f7c6270ecc24f4f36ac8ead30bc1f5f.

drivers/mmc/core/Kconfig
drivers/mmc/core/sd.c

index 103be88956762ce1b2f591e48d2498332e1a9944..ab37a6d9d32a046d7318b3a89a6358c8456b5ef9 100644 (file)
@@ -14,11 +14,3 @@ config MMC_UNSAFE_RESUME
          This option is usually just for embedded systems which use
          a MMC/SD card for rootfs. Most people should say N here.
 
-config MMC_PARANOID_SD_INIT
-       bool "Enable paranoid SD card initialization (EXPERIMENTAL)"
-       help
-         If you say Y here, the MMC layer will be extra paranoid
-         about re-trying SD init requests. This can be a useful
-         work-around for buggy controllers and hardware. Enable
-         if you are experiencing issues with SD detection.
-
index 2d089e672c6bd27061398088d34fb5f31c6c9f06..10b2a4d20f5a1a6b270592d6b048514126bda96a 100755 (executable)
@@ -336,9 +336,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
        int err;
        u32 cid[4];
        unsigned int max_dtr;
-#ifdef CONFIG_MMC_PARANOID_SD_INIT
-       int retries;
-#endif
+
        BUG_ON(!host);
        WARN_ON(!host->claimed);
 
@@ -441,29 +439,11 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
                err = mmc_decode_scr(card);
                if (err < 0)
                        goto free_card;
+
                /*
                 * Fetch switch information from card.
                 */
-#ifdef CONFIG_MMC_PARANOID_SD_INIT
-               for (retries = 1; retries <= 3; retries++) {
-                       err = mmc_read_switch(card);
-                       if (!err) {
-                               if (retries > 1) {
-                                       printk(KERN_WARNING
-                                              "%s: recovered\n", 
-                                              mmc_hostname(host));
-                               }
-                               break;
-                       } else {
-                               printk(KERN_WARNING
-                                      "%s: read switch failed (attempt %d)\n",
-                                      mmc_hostname(host), retries);
-                       }
-               }
-#else
                err = mmc_read_switch(card);
-#endif
-
                if (err)
                        goto free_card;
        }