summaryrefslogtreecommitdiff
path: root/sys/dev/ofw
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2022-01-11 10:08:18 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2022-02-21 16:29:07 +0000
commit02398e581d4511bd1c5e8ffad5155f9b9684b4b8 (patch)
tree9d64183d8bfdc5f090e1a25282963f2290e7e421 /sys/dev/ofw
parent85b3794ceef5f3591e21759f592f09afb4b7a1dd (diff)
Diffstat (limited to 'sys/dev/ofw')
-rw-r--r--sys/dev/ofw/ofw_cpu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c
index 5cbec1eb2ab1..c16973373acd 100644
--- a/sys/dev/ofw/ofw_cpu.c
+++ b/sys/dev/ofw/ofw_cpu.c
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
#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 @@ ofw_cpu_attach(device_t dev)
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 @@ ofw_cpu_attach(device_t dev)
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);