Message ID | 20250116133927.37227-1-vliaskovitis@suse.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] hw/riscv/virt: Add serial alias in DTB | expand |
On Thu, Jan 16, 2025 at 02:39:27PM +0100, Vasilis Liaskovitis wrote: > This patch adds an "aliases" node with a "serial0" entry for the s/This patch adds/Add/ > single UART in the riscv64 virt machine. s/riscv64/riscv/ > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2774 > Signed-off-by: Vasilis Liaskovitis <vliaskovitis@suse.com> > --- > hw/riscv/virt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c > index 2bc5a9dd98..fb1928cebf 100644 > --- a/hw/riscv/virt.c > +++ b/hw/riscv/virt.c > @@ -971,6 +971,7 @@ static void create_fdt_uart(RISCVVirtState *s, const MemMapEntry *memmap, > } > > qemu_fdt_setprop_string(ms->fdt, "/chosen", "stdout-path", name); > + qemu_fdt_setprop_string(ms->fdt, "/aliases", "serial0", name); > } > > static void create_fdt_rtc(RISCVVirtState *s, const MemMapEntry *memmap, > @@ -1180,6 +1181,8 @@ static void create_fdt(RISCVVirtState *s, const MemMapEntry *memmap) > qemu_fdt_setprop(ms->fdt, "/chosen", "rng-seed", > rng_seed, sizeof(rng_seed)); > > + qemu_fdt_add_subnode(ms->fdt, "/aliases"); > + > create_fdt_flash(s, memmap); > create_fdt_fw_cfg(s, memmap); > create_fdt_pmu(s); > -- > 2.46.0 > Only fix the minor commit message issues if you need to respin for other reasons. Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 2bc5a9dd98..fb1928cebf 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -971,6 +971,7 @@ static void create_fdt_uart(RISCVVirtState *s, const MemMapEntry *memmap, } qemu_fdt_setprop_string(ms->fdt, "/chosen", "stdout-path", name); + qemu_fdt_setprop_string(ms->fdt, "/aliases", "serial0", name); } static void create_fdt_rtc(RISCVVirtState *s, const MemMapEntry *memmap, @@ -1180,6 +1181,8 @@ static void create_fdt(RISCVVirtState *s, const MemMapEntry *memmap) qemu_fdt_setprop(ms->fdt, "/chosen", "rng-seed", rng_seed, sizeof(rng_seed)); + qemu_fdt_add_subnode(ms->fdt, "/aliases"); + create_fdt_flash(s, memmap); create_fdt_fw_cfg(s, memmap); create_fdt_pmu(s);
This patch adds an "aliases" node with a "serial0" entry for the single UART in the riscv64 virt machine. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2774 Signed-off-by: Vasilis Liaskovitis <vliaskovitis@suse.com> --- hw/riscv/virt.c | 3 +++ 1 file changed, 3 insertions(+)