aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2020-07-22 18:33:36 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2020-07-22 18:33:36 +0000
commit9bca4667450d83520b3f68ebd87ee67d6a40792f (patch)
tree7844043c5a8cedcacfd70ace5cd4e2eb3092781f
parentc7a499485320d4e10251cafdb1a296728f2d6a12 (diff)
downloadsrc-9bca4667450d83520b3f68ebd87ee67d6a40792f.tar.gz
src-9bca4667450d83520b3f68ebd87ee67d6a40792f.zip
aw_mmc: Start a mmccam discovery when the CD handler is called.
Submitted by: kibab
Notes
Notes: svn path=/head/; revision=363426
-rw-r--r--sys/arm/allwinner/aw_mmc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c
index f19ee412cb5c..c8d3c2694d36 100644
--- a/sys/arm/allwinner/aw_mmc.c
+++ b/sys/arm/allwinner/aw_mmc.c
@@ -371,6 +371,9 @@ aw_mmc_helper_cd_handler(device_t dev, bool present)
struct aw_mmc_softc *sc;
sc = device_get_softc(dev);
+#ifdef MMCCAM
+ mmccam_start_discovery(sc->sim);
+#else
AW_MMC_LOCK(sc);
if (present) {
if (sc->child == NULL) {
@@ -397,6 +400,7 @@ aw_mmc_helper_cd_handler(device_t dev, bool present)
} else
AW_MMC_UNLOCK(sc);
}
+#endif /* MMCCAM */
}
static int