aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2025-11-05 14:37:36 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2025-11-05 14:40:34 +0000
commit768ee6d454821cc63247cb4ffe526c5a06accff0 (patch)
tree7b877a01b79f89dcf5108b7c6987643ecb576a18 /sys/dev
parentf939619a2f989656e1ecdfd7a2759e3ba44d4ec7 (diff)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/mmc/mmc_fdt_helpers.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c
index aed85dab55f4..980785464a00 100644
--- a/sys/dev/mmc/mmc_fdt_helpers.c
+++ b/sys/dev/mmc/mmc_fdt_helpers.c
@@ -160,6 +160,17 @@ cd_setup(struct mmc_helper *helper, phandle_t node)
}
/*
+ * If the device has no card-detection, treat it as non-removable.
+ * This could be improved by polling for detection.
+ */
+ if (helper->props & MMC_PROP_BROKEN_CD) {
+ helper->cd_disabled = true;
+ if (bootverbose)
+ device_printf(dev, "Broken card-detect\n");
+ return;
+ }
+
+ /*
* If there is no cd-gpios property, then presumably the hardware
* PRESENT_STATE register and interrupts will reflect card state
* properly, and there's nothing more for us to do. Our get_present()