Skip to content

Commit

Permalink
Merge pull request #1313 from endeneer/fdt-parse-clint-sifive
Browse files Browse the repository at this point in the history
riscv: sim.cc: Parse for "sifive,clint0" if "riscv,clint0" is absent
  • Loading branch information
jerryz123 authored Dec 11, 2023
2 parents f9cd7ee + f1c0008 commit 4d8651b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riscv/clint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4d8651b

Please sign in to comment.