git: 02398e581d45 - main - ofw_cpu: Make ext_resources non-optional for arm* and riscv
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 21 Feb 2022 16:30:00 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=02398e581d4511bd1c5e8ffad5155f9b9684b4b8
commit 02398e581d4511bd1c5e8ffad5155f9b9684b4b8
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-01-11 10:08:18 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-02-21 16:29:07 +0000
ofw_cpu: Make ext_resources non-optional for arm* and riscv
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.
For RISC-V it was always enabled.
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D33835
---
sys/dev/ofw/ofw_cpu.c | 6 +++---
1 file 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);