mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
This commit is contained in:
parent
196074f3b2
commit
725b72d5e0
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue