summaryrefslogtreecommitdiff
path: root/arch/riscv/cpu/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/cpu/cpu.c')
-rw-r--r--arch/riscv/cpu/cpu.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index d9f820c44c0..8286a0c959c 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
+#include <cpu.h>
+#include <log.h>
#include <asm/csr.h>
/*
@@ -53,3 +55,27 @@ int print_cpuinfo(void)
return 0;
}
+
+static int riscv_cpu_probe(void)
+{
+#ifdef CONFIG_CPU
+ int ret;
+
+ /* probe cpus so that RISC-V timer can be bound */
+ ret = cpu_probe_all();
+ if (ret)
+ return log_msg_ret("RISC-V cpus probe failed\n", ret);
+#endif
+
+ return 0;
+}
+
+int arch_cpu_init_dm(void)
+{
+ return riscv_cpu_probe();
+}
+
+int arch_early_init_r(void)
+{
+ return riscv_cpu_probe();
+}