All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/riscv/virt: re-add machine-specific compatible string to /soc/ node
@ 2019-02-10 20:17 ` Lukas Auer
  0 siblings, 0 replies; 21+ messages in thread
From: Lukas Auer @ 2019-02-10 20:17 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv
  Cc: Lukas Auer, Alistair Francis, Palmer Dabbelt, Michael Clark,
	Bastian Koppelmann, Sagar Karandikar

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.auer@aisec.fraunhofer.de>
---

 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);
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-03-19 12:33 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-10 20:17 [Qemu-devel] [PATCH] hw/riscv/virt: re-add machine-specific compatible string to /soc/ node Lukas Auer
2019-02-10 20:17 ` [Qemu-riscv] " Lukas Auer
2019-02-11 23:43 ` [Qemu-devel] " Alistair Francis
2019-02-11 23:43   ` [Qemu-riscv] " Alistair Francis
2019-03-10  1:07 ` Bin Meng
2019-03-10  1:07   ` [Qemu-riscv] " Bin Meng
2019-03-10 13:44   ` Auer, Lukas
2019-03-10 13:44     ` [Qemu-riscv] " Auer, Lukas
2019-03-10 14:57     ` Bin Meng
2019-03-10 14:57       ` [Qemu-riscv] " Bin Meng
2019-03-10 18:03       ` Auer, Lukas
2019-03-10 18:03         ` [Qemu-riscv] " Auer, Lukas
2019-03-11 15:28         ` Bin Meng
2019-03-11 15:28           ` [Qemu-riscv] " Bin Meng
2019-03-12 14:39           ` Auer, Lukas
2019-03-13  1:51             ` Bin Meng
2019-03-14 21:01               ` Auer, Lukas
2019-03-15  1:54                 ` Bin Meng
2019-03-17 18:57                   ` Auer, Lukas
2019-03-19 12:19 ` [Qemu-riscv] " Palmer Dabbelt
2019-03-19 12:32   ` Auer, Lukas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.