summaryrefslogtreecommitdiff
path: root/sys/dev/fdt/sximmc.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-02-10 11:56:27 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-02-10 11:56:27 +0000
commitad78be59885e30a1aa0166645937f2cf2c72a250 (patch)
tree814c8f5dc7988e1db45cec162ef20710777db5dd /sys/dev/fdt/sximmc.c
parente65ffcec7f79a0296a901aef444b01994311b8c5 (diff)
Handle "broken-cd" as "non-removable" for now. This will generate some
error messages if a card is absent from the slot, but other workarounds are much more complicated. From SASANO Takayoshi.
Diffstat (limited to 'sys/dev/fdt/sximmc.c')
-rw-r--r--sys/dev/fdt/sximmc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/fdt/sximmc.c b/sys/dev/fdt/sximmc.c
index 73a2a0159d9..0c22ec82a6b 100644
--- a/sys/dev/fdt/sximmc.c
+++ b/sys/dev/fdt/sximmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sximmc.c,v 1.8 2018/12/29 14:09:00 patrick Exp $ */
+/* $OpenBSD: sximmc.c,v 1.9 2019/02/10 11:56:26 kettenis Exp $ */
/* $NetBSD: awin_mmc.c,v 1.23 2015/11/14 10:32:40 bouyer Exp $ */
/*-
@@ -646,7 +646,9 @@ sximmc_card_detect(sdmmc_chipset_handle_t sch)
struct sximmc_softc *sc = sch;
int inverted, val;
- if (OF_getproplen(sc->sc_node, "non-removable") == 0)
+ /* XXX treat broken-cd as non-removable */
+ if (OF_getproplen(sc->sc_node, "non-removable") == 0 ||
+ OF_getproplen(sc->sc_node, "broken-cd") == 0)
return 1;
val = gpio_controller_get_pin(sc->sc_gpio);