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
This commit is contained in:
Ruslan Bukin 2021-04-27 12:19:05 +01:00
parent 059ec2225c
commit 4c1ecf5502

View File

@ -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");