Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt If max-frequency is not specified, use UINT_MAX ...
details: https://anonhg.NetBSD.org/src/rev/10c7eb668241
branches: trunk
changeset: 320076:10c7eb668241
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Jun 22 10:17:04 2018 +0000
description:
If max-frequency is not specified, use UINT_MAX instead of the rate programmed by the bootloader.
diffstat:
sys/dev/fdt/dwcmmc_fdt.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diffs (43 lines):
diff -r 7a5edb08b111 -r 10c7eb668241 sys/dev/fdt/dwcmmc_fdt.c
--- a/sys/dev/fdt/dwcmmc_fdt.c Fri Jun 22 09:31:04 2018 +0000
+++ b/sys/dev/fdt/dwcmmc_fdt.c Fri Jun 22 10:17:04 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwcmmc_fdt.c,v 1.2 2018/06/19 22:44:33 jmcneill Exp $ */
+/* $NetBSD: dwcmmc_fdt.c,v 1.3 2018/06/22 10:17:04 jmcneill Exp $ */
/*-
* Copyright (c) 2015-2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwcmmc_fdt.c,v 1.2 2018/06/19 22:44:33 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwcmmc_fdt.c,v 1.3 2018/06/22 10:17:04 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -88,8 +88,8 @@
struct dwc_mmc_softc *sc = &esc->sc;
struct fdt_attach_args * const faa = aux;
const int phandle = faa->faa_phandle;
- u_int fifo_depth, max_freq;
char intrstr[128];
+ u_int fifo_depth;
bus_addr_t addr;
bus_size_t size;
int error;
@@ -135,12 +135,9 @@
}
esc->sc_conf = of_search_compatible(phandle, compat_data)->data;
- const u_int ciu_div = esc->sc_conf->ciu_div > 0 ? esc->sc_conf->ciu_div : 1;
- if (of_getprop_uint32(phandle, "max-frequency", &max_freq) == 0)
- sc->sc_clock_freq = max_freq;
- else
- sc->sc_clock_freq = clk_get_rate(esc->sc_clk_ciu) / ciu_div;
+ if (of_getprop_uint32(phandle, "max-frequency", &sc->sc_clock_freq) != 0)
+ sc->sc_clock_freq = UINT_MAX;
sc->sc_fifo_depth = fifo_depth;
sc->sc_flags = DWC_MMC_F_USE_HOLD_REG | DWC_MMC_F_DMA;
Home |
Main Index |
Thread Index |
Old Index