aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Bukin <br@FreeBSD.org>2021-04-27 11:19:05 +0000
committerRuslan Bukin <br@FreeBSD.org>2021-04-27 11:19:05 +0000
commit4c1ecf5502e1b4b20553a2f996b73794cc7e6454 (patch)
treed7f18a306e6cb549d0836b376d69a4a7fb628cc0
parent059ec2225c00cc18ed9745d733cc9aa0dbd9eaa2 (diff)
downloadsrc-4c1ecf5502e1b4b20553a2f996b73794cc7e6454.tar.gz
src-4c1ecf5502e1b4b20553a2f996b73794cc7e6454.zip
Consider the broken card detect flag that comes from 'broken-cd;'
dts property. This fixes operation on Intel Stratix 10 devices. Tested on Terasic DE10-Pro. Reviewed by: manu Sponsored by: UKRI Differential revision: https://reviews.freebsd.org/D29999
-rw-r--r--sys/dev/mmc/host/dwmmc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/mmc/host/dwmmc.c b/sys/dev/mmc/host/dwmmc.c
index b31bb0d4e68b..bf494027551a 100644
--- a/sys/dev/mmc/host/dwmmc.c
+++ b/sys/dev/mmc/host/dwmmc.c
@@ -480,7 +480,8 @@ dwmmc_card_task(void *arg, int pending __unused)
#else
DWMMC_LOCK(sc);
- if (READ4(sc, SDMMC_CDETECT) == 0) {
+ if (READ4(sc, SDMMC_CDETECT) == 0 ||
+ (sc->mmc_helper.props & MMC_PROP_BROKEN_CD)) {
if (sc->child == NULL) {
if (bootverbose)
device_printf(sc->dev, "Card inserted\n");