[RFC PATCH 14/21] mmc: sdhci-esdhc-imx: remove SDHCI_QUIRK_BROKEN_CARD_DETECTION

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sdhci_esdhc_imx_pdata need SDHCI_QUIRK_BROKEN_CARD_DETECTION,
so we replace it with MMC_CAP_NEEDS_POLL while probing. For other
cases, we directly remove SDHCI_QUIRK_BROKEN_CARD_DETECTION.

Cc: Dong Aisheng <aisheng.dong@xxxxxxxxxxxxx>
Cc: Haibo Chen <haibo.chen@xxxxxxxxxxxxx>
Signed-off-by: Shawn Lin <shawn.lin@xxxxxxxxxxxxxx>
---

 drivers/mmc/host/sdhci-esdhc-imx.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index f25f292..5705be1 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -952,8 +952,7 @@ static struct sdhci_ops sdhci_esdhc_ops = {
 static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
 	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_HISPD_BIT
 			| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
-			| SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC
-			| SDHCI_QUIRK_BROKEN_CARD_DETECTION,
+			| SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC,
 	.ops = &sdhci_esdhc_ops,
 };
 
@@ -1012,7 +1011,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 		return ret;
 
 	if (!IS_ERR_VALUE(mmc_gpio_get_cd(host->mmc)))
-		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+		host->mmc->caps &= MMC_CAP_NEEDS_POLL;
 
 	return 0;
 }
@@ -1064,7 +1063,7 @@ static int sdhci_esdhc_imx_probe_nondt(struct platform_device *pdev,
 
 	case ESDHC_CD_CONTROLLER:
 		/* we have a working card_detect back */
-		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+		host->mmc->caps &= MMC_CAP_NEEDS_POLL;
 		break;
 
 	case ESDHC_CD_PERMANENT:
@@ -1104,6 +1103,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 	if (IS_ERR(host))
 		return PTR_ERR(host);
 
+	host->mmc->caps |= MMC_CAP_NEEDS_POLL;
+
 	pltfm_host = sdhci_priv(host);
 
 	imx_data = devm_kzalloc(&pdev->dev, sizeof(*imx_data), GFP_KERNEL);
-- 
2.3.7


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux