[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] hw/riscv/virt: Add serial alias in DTB
From: |
Alistair Francis |
Subject: |
Re: [PATCH v3] hw/riscv/virt: Add serial alias in DTB |
Date: |
Fri, 31 Jan 2025 11:40:07 +1000 |
On Fri, Jan 17, 2025 at 2:13 AM Vasilis Liaskovitis
<vliaskovitis@suse.com> wrote:
>
> Add an "aliases" node with a "serial0" entry for the single UART
> in the riscv virt machine.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2774
> Signed-off-by: Vasilis Liaskovitis <vliaskovitis@suse.com>
> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> 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
>
>