summaryrefslogtreecommitdiffstats
path: root/bsps/riscv/riscv/irq/irq.c
diff options
context:
space:
mode:
authorHesham Almatary <hesham.almatary@cl.cam.ac.uk>2022-12-18 15:07:16 +0000
committerHesham Almatary <hesham.almatary@cl.cam.ac.uk>2022-12-23 09:21:14 +0000
commit88b80a5fd0035d4f2a5c752c0159a989812d29c8 (patch)
tree5b80f8e95ce822c90f877bf7ed12c3834d633e0e /bsps/riscv/riscv/irq/irq.c
parentspec/build/riscv: Start all riscv/riscv BSPs at 0x80000000 (diff)
downloadrtems-88b80a5fd0035d4f2a5c752c0159a989812d29c8.tar.bz2
RISC-V: Always probe for HTIF and remove RISCV_ENABLE_HTIF_SUPPORT
Updates #4779
Diffstat (limited to '')
-rw-r--r--bsps/riscv/riscv/irq/irq.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/bsps/riscv/riscv/irq/irq.c b/bsps/riscv/riscv/irq/irq.c
index 3ef06a16bd..f0ccc6f5f0 100644
--- a/bsps/riscv/riscv/irq/irq.c
+++ b/bsps/riscv/riscv/irq/irq.c
@@ -247,13 +247,16 @@ static void riscv_plic_init(const void *fdt)
node = fdt_node_offset_by_compatible(fdt, -1, "riscv,plic0");
plic = riscv_fdt_get_address(fdt, node);
+
if (plic == NULL) {
-#if RISCV_ENABLE_HTIF_SUPPORT != 0
- /* Spike platform has HTIF and does not have a PLIC */
- return;
-#else
- bsp_fatal(RISCV_FATAL_NO_PLIC_REG_IN_DEVICE_TREE);
-#endif
+ node = fdt_node_offset_by_compatible(fdt, -1, "ucb,htif0");
+
+ /* Spike platform has HTIF and does not have a PLIC */
+ if (node != -1) {
+ return;
+ } else {
+ bsp_fatal(RISCV_FATAL_NO_PLIC_REG_IN_DEVICE_TREE);
+ }
}
riscv_plic = plic;