On Thu, 2022-12-01 at 22:08 +0800, Bin Meng wrote: > At present magic number is used to create "riscv,ndev" property > in the dtb. Let's use the macro SIFIVE_U_PLIC_NUM_SOURCES that > is used to instantiate the PLIC model instead. > > Signed-off-by: Bin Meng <bm...@tinylab.org> > --- > > hw/riscv/sifive_u.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Wilfred Mallawa <wilfred.mall...@wdc.com> > diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c > index b139824aab..b40a4767e2 100644 > --- a/hw/riscv/sifive_u.c > +++ b/hw/riscv/sifive_u.c > @@ -287,7 +287,8 @@ static void create_fdt(SiFiveUState *s, const > MemMapEntry *memmap, > qemu_fdt_setprop_cells(fdt, nodename, "reg", > 0x0, memmap[SIFIVE_U_DEV_PLIC].base, > 0x0, memmap[SIFIVE_U_DEV_PLIC].size); > - qemu_fdt_setprop_cell(fdt, nodename, "riscv,ndev", 0x35); > + qemu_fdt_setprop_cell(fdt, nodename, "riscv,ndev", > + SIFIVE_U_PLIC_NUM_SOURCES - 1); > qemu_fdt_setprop_cell(fdt, nodename, "phandle", plic_phandle); > plic_phandle = qemu_fdt_get_phandle(fdt, nodename); > g_free(cells);
- Re: [PATCH 08/15] hw/intc: sifive_plic: Update "... Alistair Francis
- [PATCH 12/15] hw/riscv: virt: Fix the value of "risc... Bin Meng
- Re: [PATCH 12/15] hw/riscv: virt: Fix the value of &... Alistair Francis
- [PATCH 10/15] hw/riscv: sifive_e: Fix the number of inter... Bin Meng
- Re: [PATCH 10/15] hw/riscv: sifive_e: Fix the number... Wilfred Mallawa
- Re: [PATCH 10/15] hw/riscv: sifive_e: Fix the number... Alistair Francis
- [PATCH 03/15] hw/riscv: Fix opentitan dependency to SIFIV... Bin Meng
- Re: [PATCH 03/15] hw/riscv: Fix opentitan dependency... Wilfred Mallawa
- Re: [PATCH 03/15] hw/riscv: Fix opentitan dependency... Alistair Francis
- [PATCH 11/15] hw/riscv: sifive_u: Avoid using magic numbe... Bin Meng
- Re: [PATCH 11/15] hw/riscv: sifive_u: Avoid using ma... Wilfred Mallawa
- Re: [PATCH 11/15] hw/riscv: sifive_u: Avoid using ma... Alistair Francis
- [PATCH 02/15] hw/intc: Select MSI_NONBROKEN in RISC-V AIA... Bin Meng
- Re: [PATCH 02/15] hw/intc: Select MSI_NONBROKEN in R... Alistair Francis
- [PATCH 13/15] hw/intc: sifive_plic: Change "priority... Bin Meng
- Re: [PATCH 13/15] hw/intc: sifive_plic: Change "... Alistair Francis
- [PATCH 05/15] hw/riscv: spike: Remove misleading comments Bin Meng
- Re: [PATCH 05/15] hw/riscv: spike: Remove misleading... Wilfred Mallawa
- Re: [PATCH 05/15] hw/riscv: spike: Remove misleading... Alistair Francis
- [PATCH 06/15] hw/intc: sifive_plic: Drop PLICMode_H Bin Meng
- Re: [PATCH 06/15] hw/intc: sifive_plic: Drop PLICMod... Wilfred Mallawa