diff options
author | Tan En De <ende.tan@starfivetech.com> | 2023-04-11 15:49:19 +0800 |
---|---|---|
committer | Jerry Zhao <jerryz123@berkeley.edu> | 2023-12-11 14:42:34 -0800 |
commit | f1c000837c6251e716463e6d70ef7e959fa2bfed (patch) | |
tree | feb96d686d40e347431597960941e6fa8889bb27 /riscv | |
parent | 1f466dfd1520d44dc77af123d68b58d558eee3c4 (diff) | |
download | riscv-isa-sim-f1c000837c6251e716463e6d70ef7e959fa2bfed.zip riscv-isa-sim-f1c000837c6251e716463e6d70ef7e959fa2bfed.tar.gz riscv-isa-sim-f1c000837c6251e716463e6d70ef7e959fa2bfed.tar.bz2 |
riscv: sim.cc: Parse for "sifive,clint0" if "riscv,clint0" is absent
"riscv,clint0" and "sifive,clint0" in device tree's "compatible" string point to the same driver,
as can be seen from drivers/clocksource/timer-clint.c in Linux kernel.
https://github.com/torvalds/linux/commit/2ac6795fcc085e8d03649f1bbd0d70aaff612cad
Signed-off-by: Tan En De <ende.tan@starfivetech.com>
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/clint.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/clint.cc b/riscv/clint.cc index 2fb9ef3..9d25db8 100644 --- a/riscv/clint.cc +++ b/riscv/clint.cc @@ -118,7 +118,7 @@ void clint_t::tick(reg_t rtc_ticks) clint_t* clint_parse_from_fdt(const void* fdt, const sim_t* sim, reg_t* base, const std::vector<std::string>& sargs) { - if (fdt_parse_clint(fdt, base, "riscv,clint0") == 0) + if (fdt_parse_clint(fdt, base, "riscv,clint0") == 0 || fdt_parse_clint(fdt, base, "sifive,clint0") == 0) return new clint_t(sim, sim->CPU_HZ / sim->INSNS_PER_RTC_TICK, sim->get_cfg().real_time_clint()); |