summaryrefslogtreecommitdiffstats
path: root/drivers/mci/imx-esdhc.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-07-14 14:32:20 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-07-14 14:37:51 +0200
commit7be6d297245a4a92008d38e0700537d948fa525a (patch)
treef2d0fd5eb78a3555aba258484d0d9ecefc47b5d8 /drivers/mci/imx-esdhc.c
parentca95c2bab96b4109e3340e79dbc9a584577fea91 (diff)
downloadbarebox-7be6d297245a4a92008d38e0700537d948fa525a.tar.gz
barebox-7be6d297245a4a92008d38e0700537d948fa525a.tar.xz
Revert "mci: imx-esdhc: Remove excess function"
This reverts commit 8a6896971d093b9d8d1c36eb0d7af891b6ca5369. With this patch it's no longer possible to call detect on the physical device which is necessary for example to make environment on MMC work. Unlike the commit message for 8a6896971d claims mci_detect_card() is not called from mci_register(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/imx-esdhc.c')
-rw-r--r--drivers/mci/imx-esdhc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 4c45e929ba..66786ffec7 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -550,6 +550,13 @@ static int esdhc_reset(struct fsl_esdhc_host *host)
return 0;
}
+static int fsl_esdhc_detect(struct device_d *dev)
+{
+ struct fsl_esdhc_host *host = dev->priv;
+
+ return mci_detect_card(&host->mci);
+}
+
static int fsl_esdhc_probe(struct device_d *dev)
{
struct resource *iores;
@@ -608,6 +615,8 @@ static int fsl_esdhc_probe(struct device_d *dev)
host->mci.card_present = esdhc_card_present;
host->mci.hw_dev = dev;
+ dev->detect = fsl_esdhc_detect,
+
rate = clk_get_rate(host->clk);
host->mci.f_min = rate >> 12;
if (host->mci.f_min < 200000)