From 131b99b6309f24ba5b394168ae19955ad30aac53 Mon Sep 17 00:00:00 2001 From: visa Date: Mon, 3 May 2021 13:11:40 +0000 Subject: [PATCH] Make sdhc(4) attachment work on Zynq-7000. OK kettenis@ --- sys/dev/fdt/sdhc_fdt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- 2.20.1