mmc: replace tSD enumaration machanism
authorlintao <lintao@rock-chips.com>
Mon, 2 Mar 2015 01:25:57 +0000 (09:25 +0800)
committerlintao <lintao@rock-chips.com>
Mon, 2 Mar 2015 01:36:03 +0000 (09:36 +0800)
Remove dt property "support-tSD" and combine "support-emmc" with
"support-sd" in together for tSD/emmc distinguish by mmc core. More details
please refer to arch/arm/boot/dts/rk3288-tb.dts

Signed-off-by: lintao <lintao@rock-chips.com>
arch/arm/boot/dts/rk3288-tb.dts
arch/arm/boot/dts/rk3288-tb_8846.dts
drivers/mmc/core/core.c
drivers/mmc/host/rk_sdmmc.c

index 023ec6a84b6779cdd88fc2099d66bab95a3ee571..9858154d3e1710ef9e77becb15a1d498d18224bf 100755 (executable)
 
         supports-highspeed;
        supports-emmc;
+       //supports-sd;
         bootpart-no-access;
        
-       //supports-tSD;
        //supports-DDR_MODE; //you should set the two value in your project. only close in RK3288-SDK board.
        //caps2-mmc-hs200;
 
index 6362cd2b16ddc1ca9acb02b0a3a193ece72d7e7e..caeaaefff8b34cb0d5a5def0f173367c560aecf4 100755 (executable)
 
         supports-highspeed;
        supports-emmc;
-        bootpart-no-access;
+        //supports-sd;
+       bootpart-no-access;
 
-       //supports-tSD;
        //supports-DDR_MODE; //you should set the two value in your project. only close in RK3288-SDK board.
        //caps2-mmc-hs200;
 
index 3e809c2435c8107e8911ac997c3366bfacc901b3..af07fadfffaa696bcbc21f57aab1998995152b6e 100755 (executable)
@@ -2419,17 +2419,17 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
            mmc_send_if_cond(host, host->ocr_avail);
 
         /* Order's important: probe SDIO, then SD, then MMC */
-       if ((host->restrict_caps & RESTRICT_CARD_TYPE_SDIO) && !mmc_attach_sdio(host))
+       if ((host->restrict_caps & RESTRICT_CARD_TYPE_SDIO) &&
+               !mmc_attach_sdio(host))
                return 0;
-       if ((host->restrict_caps & (RESTRICT_CARD_TYPE_SD | RESTRICT_CARD_TYPE_TSD)) && !mmc_attach_sd(host))
+       if ((host->restrict_caps & RESTRICT_CARD_TYPE_SD) &&
+               !mmc_attach_sd(host))
+               return 0;
+       if ((host->restrict_caps & RESTRICT_CARD_TYPE_EMMC) &&
+               !mmc_attach_mmc(host))
                return 0;
-       if ((host->restrict_caps & RESTRICT_CARD_TYPE_EMMC) && !mmc_attach_mmc(host))
-               return 0;   
 #endif
 
-
-
-
        mmc_power_off(host);
        return -EIO;
 }
index b7d1175a6c66da0092c678b77654310b7f032e79..aea1afa7b576f63cd57f7359796fb1beddf90c40 100755 (executable)
@@ -3441,9 +3441,6 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
                mmc->restrict_caps |= RESTRICT_CARD_TYPE_SDIO;  
        if (of_find_property(host->dev->of_node, "supports-emmc", NULL))
                mmc->restrict_caps |= RESTRICT_CARD_TYPE_EMMC;
-       /* Fixup for tSD */
-        if (of_find_property(host->dev->of_node, "supports-tSD", NULL))
-               mmc->restrict_caps |= RESTRICT_CARD_TYPE_TSD;
 
         if (mmc->restrict_caps & RESTRICT_CARD_TYPE_SD) {
                 mmc->pm_notify.notifier_call = dw_mci_pm_notify;