Skip to content

Commit

Permalink
tools/litex_json2dts_linux: don't hardcode phandle for clint's interr…
Browse files Browse the repository at this point in the history
…upts-extended
  • Loading branch information
trabucayre committed Mar 5, 2024
1 parent 044760e commit 1511c8f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions litex/tools/litex_json2dts_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,14 @@ def generate_dts(d, initrd_start=None, initrd_size=None, initrd=None, root_devic
dts += """
lintc0: clint@{clint_base:x} {{
compatible = "riscv,clint0";
interrupts-extended = <&L4 3 &L4 7>;
interrupts-extended = <
{cpu_mapping}>;
reg = <0x{clint_base:x} 0x10000>;
reg-names = "control";
}};
""".format(clint_base=d["memories"]["clint"]["base"])
""".format(
clint_base=d["memories"]["clint"]["base"],
cpu_mapping =("\n" + " "*20).join(["&L{} 3 &L{} 7".format(cpu, cpu) for cpu in range(ncpus)]))
if cpu_arch == "riscv":
dts += """
intc0: interrupt-controller@{plic_base:x} {{
Expand Down

0 comments on commit 1511c8f

Please sign in to comment.