diff options
author | 2020-05-19 15:47:32 +0000 | |
---|---|---|
committer | 2020-05-19 15:47:32 +0000 | |
commit | 92525d31d2585dba3ccee62c14c83c250c4b491b (patch) | |
tree | 609aefdc53fb36d6b20558b4b459b1bf4242b48a | |
parent | Don't provide backlight control if the list returned by _BCL is empty. (diff) | |
download | wireguard-openbsd-92525d31d2585dba3ccee62c14c83c250c4b491b.tar.xz wireguard-openbsd-92525d31d2585dba3ccee62c14c83c250c4b491b.zip |
We need to double the clock frequency for DDR modes.
-rw-r--r-- | sys/dev/fdt/amlmmc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/fdt/amlmmc.c b/sys/dev/fdt/amlmmc.c index db7b2f353ba..3f5738c82fa 100644 --- a/sys/dev/fdt/amlmmc.c +++ b/sys/dev/fdt/amlmmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amlmmc.c,v 1.5 2020/05/17 22:19:43 kettenis Exp $ */ +/* $OpenBSD: amlmmc.c,v 1.6 2020/05/19 15:47:32 kettenis Exp $ */ /* * Copyright (c) 2019 Mark Kettenis <kettenis@openbsd.org> * @@ -500,6 +500,10 @@ amlmmc_bus_clock(sdmmc_chipset_handle_t sch, int freq, int timing) /* Convert clock frequency from kHz to Hz. */ freq = freq * 1000; + /* Double the clock rate for DDR modes. */ + if (timing == SDMMC_TIMING_MMC_DDR52) + freq = freq * 2; + if (freq < (sc->sc_clkin1 / SD_EMMC_CLOCK_DIV_MAX)) { div = (sc->sc_clkin0 + freq - 1) / freq; clock = SD_EMMC_CLOCK_CLK_SRC_24M | div; |