From: lintao Date: Mon, 2 Mar 2015 01:25:57 +0000 (+0800) Subject: mmc: replace tSD enumaration machanism X-Git-Tag: firefly_0821_release~4263^2~31 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=43faede2e2ee19e351eceee298eca27c1cf03e25;p=firefly-linux-kernel-4.4.55.git mmc: replace tSD enumaration machanism 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 --- diff --git a/arch/arm/boot/dts/rk3288-tb.dts b/arch/arm/boot/dts/rk3288-tb.dts index 023ec6a84b67..9858154d3e17 100755 --- a/arch/arm/boot/dts/rk3288-tb.dts +++ b/arch/arm/boot/dts/rk3288-tb.dts @@ -235,9 +235,9 @@ 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; diff --git a/arch/arm/boot/dts/rk3288-tb_8846.dts b/arch/arm/boot/dts/rk3288-tb_8846.dts index 6362cd2b16dd..caeaaefff8b3 100755 --- a/arch/arm/boot/dts/rk3288-tb_8846.dts +++ b/arch/arm/boot/dts/rk3288-tb_8846.dts @@ -276,9 +276,9 @@ 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; diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 3e809c2435c8..af07fadfffaa 100755 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -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; } diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index b7d1175a6c66..aea1afa7b576 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -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;