summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2021-05-03 13:11:41 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2021-05-03 13:11:41 +0000
commit3dc8917973f7ba9df13b32afccfa6db858a7d004 (patch)
treece724e3c897672b0719e1d6db1b06c4fac7b39de /sys/dev/fdt
parentc7935712d60f6fb456292b30dbb504c8acf699db (diff)
Make sdhc(4) attachment work on Zynq-7000.
OK kettenis@
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/sdhc_fdt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/fdt/sdhc_fdt.c b/sys/dev/fdt/sdhc_fdt.c
index f085c030c81..9633d6630c2 100644
--- a/sys/dev/fdt/sdhc_fdt.c
+++ b/sys/dev/fdt/sdhc_fdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdhc_fdt.c,v 1.15 2021/04/05 09:31:45 patrick Exp $ */
+/* $OpenBSD: sdhc_fdt.c,v 1.16 2021/05/03 13:11:40 visa Exp $ */
/*
* Copyright (c) 2017 Mark Kettenis
*
@@ -126,6 +126,7 @@ sdhc_fdt_match(struct device *parent, void *match, void *aux)
struct fdt_attach_args *faa = aux;
return (OF_is_compatible(faa->fa_node, "arasan,sdhci-5.1") ||
+ OF_is_compatible(faa->fa_node, "arasan,sdhci-8.9a") ||
OF_is_compatible(faa->fa_node, "brcm,bcm2711-emmc2") ||
OF_is_compatible(faa->fa_node, "brcm,bcm2835-sdhci") ||
OF_is_compatible(faa->fa_node, "marvell,armada-3700-sdhci") ||
@@ -232,6 +233,11 @@ sdhc_fdt_attach(struct device *parent, struct device *self, void *aux)
sc->sc.sc_flags |= SDHC_F_NODDR50;
}
+ if (OF_is_compatible(faa->fa_node, "arasan,sdhci-8.9a")) {
+ freq = clock_get_frequency(faa->fa_node, "clk_xin");
+ sc->sc.sc_clkbase = freq / 1000;
+ }
+
if (OF_is_compatible(faa->fa_node, "brcm,bcm2711-emmc2"))
sc->sc.sc_flags |= SDHC_F_NOPWR0;