summaryrefslogtreecommitdiff
path: root/drivers/mmc/sdhci.c
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2016-12-30 06:30:14 (GMT)
committerJaehoon Chung <jh80.chung@samsung.com>2017-01-11 10:40:11 (GMT)
commit5e96217f04342bfeca7a089eb1cfa726f719a8a0 (patch)
tree3e302a60179a739a0ea9f6c7c5531a6c3ff326ac /drivers/mmc/sdhci.c
parent62358a988eef74e170f7ac8cb01c74e5bd5f36c7 (diff)
downloadu-boot-5e96217f04342bfeca7a089eb1cfa726f719a8a0.tar.xz
mmc: pic32_sdhci: move the code to pic32_sdhci.c
This code is used for only pic32_sdhci controller. To remove the "#ifdef", moves to pic32_sdhci.c. And use the get_cd callback function. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc/sdhci.c')
-rw-r--r--drivers/mmc/sdhci.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index c512a4c..230416a 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -485,12 +485,8 @@ static int sdhci_init(struct mmc *mmc)
sdhci_set_power(host, fls(mmc->cfg->voltages) - 1);
if (host->quirks & SDHCI_QUIRK_NO_CD) {
-#if defined(CONFIG_PIC32_SDHCI)
- /* PIC32 SDHCI CD errata:
- * - set CD_TEST and clear CD_TEST_INS bit
- */
- sdhci_writeb(host, SDHCI_CTRL_CD_TEST, SDHCI_HOST_CONTROL);
-#endif
+ if (host->ops->get_cd)
+ host->ops->get_cd(host);
}
/* Enable only interrupts served by the SD controller */