mirror of
https://github.com/opnsense/src.git
synced 2026-04-05 17:35:17 -04:00
If the device tree directly contains the timebase frequency, use it. This
property is required by ePAPR, but maintain the fallback to bus-frequency for compatibility. MFC after: 2 weeks
This commit is contained in:
parent
efd01e3755
commit
d26eb2c194
1 changed files with 4 additions and 0 deletions
|
|
@ -188,6 +188,10 @@ bare_timebase_freq(platform_t plat, struct cpuref *cpuref)
|
|||
if ((child = OF_child(cpus)) == 0)
|
||||
goto out;
|
||||
|
||||
if (OF_getprop(child, "timebase-frequency", (void *)&ticks,
|
||||
sizeof(ticks)) == sizeof(ticks))
|
||||
goto out;
|
||||
|
||||
freq = 0;
|
||||
if (OF_getprop(child, "bus-frequency", (void *)&freq,
|
||||
sizeof(freq)) <= 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue