summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-06-01 20:45:09 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-06-01 20:45:09 +0000
commitf0e5f250e66fe169cc47eac7306d6463e4924ae5 (patch)
treef200f6b35c91107878d1bd231a9cfbf7c955491c /sys
parente85f9b29198e60d1a08ac4866e32ee49e91b9b49 (diff)
Pass flags for highspeed capabilities based on device tree properties.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/fdt/dwmmc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/fdt/dwmmc.c b/sys/dev/fdt/dwmmc.c
index a8610b1bba5..15fe5851b78 100644
--- a/sys/dev/fdt/dwmmc.c
+++ b/sys/dev/fdt/dwmmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwmmc.c,v 1.12 2018/06/01 18:25:17 kettenis Exp $ */
+/* $OpenBSD: dwmmc.c,v 1.13 2018/06/01 20:45:08 kettenis Exp $ */
/*
* Copyright (c) 2017 Mark Kettenis
*
@@ -371,6 +371,11 @@ dwmmc_attach(struct device *parent, struct device *self, void *aux)
saa.dmat = sc->sc_dmat;
saa.dmap = sc->sc_dmap;
+ if (OF_getproplen(sc->sc_node, "cap-mmc-highspeed") == 0)
+ saa.caps |= SMC_CAPS_MMC_HIGHSPEED;
+ if (OF_getproplen(sc->sc_node, "cap-sd-highspeed") == 0)
+ saa.caps |= SMC_CAPS_SD_HIGHSPEED;
+
width = OF_getpropint(faa->fa_node, "bus-width", 1);
if (width >= 8)
saa.caps |= SMC_CAPS_8BIT_MODE;