[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1453871318-3888-1-git-send-email-shawn.lin@rock-chips.com>
Date: Wed, 27 Jan 2016 13:08:38 +0800
From: Shawn Lin <shawn.lin@...k-chips.com>
To: Ulf Hansson <ulf.hansson@...aro.org>
Cc: bcm-kernel-feedback-list@...adcom.com,
linux-rpi-kernel@...ts.infradead.org, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org, Shawn Lin <shawn.lin@...k-chips.com>,
Dong Aisheng <aisheng.dong@...escale.com>,
Haibo Chen <haibo.chen@...escale.com>
Subject: [RFC PATCH 14/21] mmc: sdhci-esdhc-imx: remove SDHCI_QUIRK_BROKEN_CARD_DETECTION
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@...escale.com>
Cc: Haibo Chen <haibo.chen@...escale.com>
Signed-off-by: Shawn Lin <shawn.lin@...k-chips.com>
---
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
Powered by blists - more mailing lists