[PATCH 03/22] mci: omap: implement device detect callback
Sascha Hauer
s.hauer at pengutronix.de
Mon Aug 26 02:55:44 EDT 2013
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mci/omap_hsmmc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c
index 014cb47..bb976e1 100644
--- a/drivers/mci/omap_hsmmc.c
+++ b/drivers/mci/omap_hsmmc.c
@@ -574,6 +574,13 @@ static void mmc_set_ios(struct mci_host *mci, struct mci_ios *ios)
writel(readl(&mmc_base->sysctl) | CEN_ENABLE, &mmc_base->sysctl);
}
+static int omap_mmc_detect(struct device_d *dev)
+{
+ struct omap_hsmmc *hsmmc = dev->priv;
+
+ return mci_detect_card(&hsmmc->mci);
+}
+
static int omap_mmc_probe(struct device_d *dev)
{
struct omap_hsmmc *hsmmc;
@@ -609,6 +616,9 @@ static int omap_mmc_probe(struct device_d *dev)
else
hsmmc->mci.f_max = 52000000;
+ dev->priv = hsmmc;
+ dev->detect = omap_mmc_detect,
+
mci_register(&hsmmc->mci);
return 0;
--
1.8.4.rc3
More information about the barebox
mailing list