svn commit: r287250 - head/sys/dev/mmc/host
Andrew Turner
andrew at FreeBSD.org
Fri Aug 28 10:34:38 UTC 2015
Author: andrew
Date: Fri Aug 28 10:34:37 2015
New Revision: 287250
URL: https://svnweb.freebsd.org/changeset/base/287250
Log:
Only check for the bus frequency if it has not already been set, for
example through a driver running as a subclass of this.
Sponsored by: ABT Systems Ltd
Modified:
head/sys/dev/mmc/host/dwmmc.c
Modified: head/sys/dev/mmc/host/dwmmc.c
==============================================================================
--- head/sys/dev/mmc/host/dwmmc.c Fri Aug 28 09:38:18 2015 (r287249)
+++ head/sys/dev/mmc/host/dwmmc.c Fri Aug 28 10:34:37 2015 (r287250)
@@ -481,10 +481,12 @@ parse_fdt(struct dwmmc_softc *sc)
* what the clock is supplied for our device.
* For now rely on the value specified in FDT.
*/
- if ((len = OF_getproplen(node, "bus-frequency")) <= 0)
- return (ENXIO);
- OF_getencprop(node, "bus-frequency", dts_value, len);
- sc->bus_hz = dts_value[0];
+ if (sc->bus_hz == 0) {
+ if ((len = OF_getproplen(node, "bus-frequency")) <= 0)
+ return (ENXIO);
+ OF_getencprop(node, "bus-frequency", dts_value, len);
+ sc->bus_hz = dts_value[0];
+ }
/*
* Platform-specific stuff
More information about the svn-src-all
mailing list