Page MenuHomeFreeBSD

D33835.diff
No OneTemporary

D33835.diff

diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c
--- a/sys/dev/ofw/ofw_cpu.c
+++ b/sys/dev/ofw/ofw_cpu.c
@@ -45,7 +45,7 @@
#include <dev/ofw/ofw_bus_subr.h>
#include <dev/ofw/ofw_cpu.h>
-#ifdef EXT_RESOURCES
+#if defined(__arm__) || defined(__arm64__) || defined(__riscv__)
#include <dev/extres/clk/clk.h>
#endif
@@ -207,7 +207,7 @@
phandle_t node;
pcell_t cell;
int rv;
-#ifdef EXT_RESOURCES
+#if defined(__arm__) || defined(__arm64__) || defined(__riscv__)
clk_t cpuclk;
uint64_t freq;
#endif
@@ -277,7 +277,7 @@
sc->sc_cpu_pcpu = pcpu_find(device_get_unit(dev));
if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) < 0) {
-#ifdef EXT_RESOURCES
+#if defined(__arm__) || defined(__arm64__) || defined(__riscv__)
rv = clk_get_by_ofw_index(dev, 0, 0, &cpuclk);
if (rv == 0) {
rv = clk_get_freq(cpuclk, &freq);

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 14, 9:29 AM (14 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15792991
Default Alt Text
D33835.diff (867 B)

Event Timeline