diff options
author | Palmer Dabbelt | 2019-11-07 23:25:00 +0100 |
---|---|---|
committer | Palmer Dabbelt | 2019-11-25 21:34:52 +0100 |
commit | 9c0fb20c4bd50a99c3c6f6d515e05eaf8dd87fa4 (patch) | |
tree | 765c90476627ba24d0a9476c84aca6a613dcdc68 /hw/riscv | |
parent | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (diff) | |
download | qemu-9c0fb20c4bd50a99c3c6f6d515e05eaf8dd87fa4.tar.gz qemu-9c0fb20c4bd50a99c3c6f6d515e05eaf8dd87fa4.tar.xz qemu-9c0fb20c4bd50a99c3c6f6d515e05eaf8dd87fa4.zip |
RISC-V: virt: This is a "sifive,test1" test finisher
The test finisher implements the reset command, which means it's a
"sifive,test1" device. This is a backwards compatible change, so it's
also a "sifive,test0" device. I copied the odd idiom for adding a
two-string compatible field from the ARM virt board.
Fixes: 9a2551ed6f ("riscv: sifive_test: Add reset functionality")
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'hw/riscv')
-rw-r--r-- | hw/riscv/virt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 23f340df19..74f2dce81c 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -359,7 +359,10 @@ static void create_fdt(RISCVVirtState *s, const struct MemmapEntry *memmap, nodename = g_strdup_printf("/test@%lx", (long)memmap[VIRT_TEST].base); qemu_fdt_add_subnode(fdt, nodename); - qemu_fdt_setprop_string(fdt, nodename, "compatible", "sifive,test0"); + { + const char compat[] = "sifive,test1\0sifive,test0"; + qemu_fdt_setprop(fdt, nodename, "compatible", compat, sizeof(compat)); + } qemu_fdt_setprop_cells(fdt, nodename, "reg", 0x0, memmap[VIRT_TEST].base, 0x0, memmap[VIRT_TEST].size); |