From: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Cc: Lukas Auer <lukas.auer@aisec.fraunhofer.de>,
Alistair Francis <Alistair.Francis@wdc.com>,
Palmer Dabbelt <palmer@sifive.com>,
Michael Clark <mjc@sifive.com>,
Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
Sagar Karandikar <sagark@eecs.berkeley.edu>
Subject: [Qemu-devel] [PATCH] hw/riscv/virt: re-add machine-specific compatible string to /soc/ node
Date: Sun, 10 Feb 2019 21:17:26 +0100 [thread overview]
Message-ID: <20190210201726.3567-1-lukas.auer@aisec.fraunhofer.de> (raw)
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
next reply other threads:[~2019-02-10 20:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-10 20:17 Lukas Auer [this message]
2019-02-11 23:43 ` [Qemu-devel] [PATCH] hw/riscv/virt: re-add machine-specific compatible string to /soc/ node Alistair Francis
2019-03-10 1:07 ` Bin Meng
2019-03-10 13:44 ` Auer, Lukas
2019-03-10 14:57 ` Bin Meng
2019-03-10 18:03 ` Auer, Lukas
2019-03-11 15:28 ` Bin Meng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190210201726.3567-1-lukas.auer@aisec.fraunhofer.de \
--to=lukas.auer@aisec.fraunhofer.de \
--cc=Alistair.Francis@wdc.com \
--cc=kbastian@mail.uni-paderborn.de \
--cc=mjc@sifive.com \
--cc=palmer@sifive.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=sagark@eecs.berkeley.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).