On Tue, 2019-03-19 at 05:19 -0700, Palmer Dabbelt wrote: > On Sun, 10 Feb 2019 12:17:26 PST (-0800), > lukas.a...@aisec.fraunhofer.de wrote: > > Re-add the previous compatible string "riscv-virtio-soc" to the soc > > device tree node to allow U-Boot and Linux to bind machine-specific > > drivers to it. The current compatible string "simple-bus" is > > retained. > > > > This is required by U-Boot to bind devices early, as part of the > > pre-relocation driver model. > > > > Fixes: 53f54508dae6("hw/riscv/virtio: Set the soc device tree node > > as a > > simple-bus") > > Signed-off-by: Lukas Auer <lukas.a...@aisec.fraunhofer.de> > > I still had this at the top of my patch queue, but from looking at > the thread > it appears the resolution here is to drop this in favor of generic > support. > LMK if I missed something.
Yes, you are right. We are going to fix this from the U-Boot side, so this patch can be dropped. Thanks, Lukas > > > --- > > > > hw/riscv/virt.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c > > index 3e8b19c668..c53bb905ff 100644 > > --- a/hw/riscv/virt.c > > +++ b/hw/riscv/virt.c > > @@ -157,6 +157,7 @@ static void *create_fdt(RISCVVirtState *s, > > const struct MemmapEntry *memmap, > > char *nodename; > > uint32_t plic_phandle, phandle = 1; > > int i; > > + const char soc_compat[] = "riscv-virtio-soc\0simple-bus"; > > > > fdt = s->fdt = create_device_tree(&s->fdt_size); > > if (!fdt) { > > @@ -171,7 +172,7 @@ static void *create_fdt(RISCVVirtState *s, > > const struct MemmapEntry *memmap, > > > > qemu_fdt_add_subnode(fdt, "/soc"); > > qemu_fdt_setprop(fdt, "/soc", "ranges", NULL, 0); > > - qemu_fdt_setprop_string(fdt, "/soc", "compatible", "simple- > > bus"); > > + qemu_fdt_setprop(fdt, "/soc", "compatible", soc_compat, > > sizeof(soc_compat)); > > qemu_fdt_setprop_cell(fdt, "/soc", "#size-cells", 0x2); > > qemu_fdt_setprop_cell(fdt, "/soc", "#address-cells", 0x2);