summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-08-27 06:43:29 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-08-27 06:43:29 +0000
commitf703f431d7dbf158223a5c0c85e04625f68404f0 (patch)
tree39f240eb3e71b3e82c0ea562fa1df33c1dd40651 /sys/dev/fdt
parent39842f8090104009ac6a98e92649ed6b3e1fa953 (diff)
HiSilicon SoCs pre-divide the clock by a factor 8.
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/dwmmc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/fdt/dwmmc.c b/sys/dev/fdt/dwmmc.c
index 0f6203c2ff5..c7f8f4566ce 100644
--- a/sys/dev/fdt/dwmmc.c
+++ b/sys/dev/fdt/dwmmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwmmc.c,v 1.17 2018/08/26 14:12:47 kettenis Exp $ */
+/* $OpenBSD: dwmmc.c,v 1.18 2018/08/27 06:43:28 kettenis Exp $ */
/*
* Copyright (c) 2017 Mark Kettenis
*
@@ -315,9 +315,12 @@ dwmmc_attach(struct device *parent, struct device *self, void *aux)
sc->sc_fifo_depth = SDMMC_FIFOTH_RXWM(fifoth) + 1;
}
- /* Some Rockchip variants pre-divide the clock. */
+ /* Some SoCs pre-divide the clock. */
if (OF_is_compatible(faa->fa_node, "rockchip,rk3288-dw-mshc"))
div = 1;
+ if (OF_is_compatible(faa->fa_node, "hisilicon,hi3660-dw-mshc") ||
+ OF_is_compatible(faa->fa_node, "hisilicon,hi3670-dw-mshc"))
+ div = 7;
freq = OF_getpropint(faa->fa_node, "clock-frequency", 0);
if (freq > 0)