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 _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"