[RFC PATCH 16/21] mmc: sdhci-of-esdhc: remove SDHCI_QUIRK_BROKEN_CARD_DETECTION

Shawn Lin shawn.lin at rock-chips.com
Tue Jan 26 21:08:55 PST 2016


This patch just remove SDHCI_QUIRK_BROKEN_CARD_DETECTION, and
use MMC_CAP_NEEDS_POLL if needed.

Cc: yangbo lu <yangbo.lu at freescale.com>
Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
---

 drivers/mmc/host/sdhci-of-esdhc.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 7fc0edc..df4fa8b 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -549,16 +549,16 @@ static const struct sdhci_ops sdhci_esdhc_le_ops = {
 };
 
 static const struct sdhci_pltfm_data sdhci_esdhc_be_pdata = {
-	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
-		| SDHCI_QUIRK_NO_CARD_NO_RESET
-		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+	.quirks = ESDHC_DEFAULT_QUIRKS |
+		  SDHCI_QUIRK_NO_CARD_NO_RESET |
+		  SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
 	.ops = &sdhci_esdhc_be_ops,
 };
 
 static const struct sdhci_pltfm_data sdhci_esdhc_le_pdata = {
-	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
-		| SDHCI_QUIRK_NO_CARD_NO_RESET
-		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+	.quirks = ESDHC_DEFAULT_QUIRKS |
+		  SDHCI_QUIRK_NO_CARD_NO_RESET |
+		  SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
 	.ops = &sdhci_esdhc_le_ops,
 };
 
@@ -595,6 +595,8 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
 	else
 		host = sdhci_pltfm_init(pdev, &sdhci_esdhc_be_pdata, 0);
 
+	host->mmc->caps |= MMC_CAP_NEEDS_POLL;
+
 	if (IS_ERR(host))
 		return PTR_ERR(host);
 
@@ -618,7 +620,7 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
 	    of_device_is_compatible(np, "fsl,p1020-esdhc") ||
 	    of_device_is_compatible(np, "fsl,t1040-esdhc") ||
 	    of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
-		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+		host->caps &= ~MMC_CAP_NEEDS_POLL;
 
 	if (of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
-- 
2.3.7





More information about the linux-rpi-kernel mailing list