qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Song Gao <gaosong@loongson.cn>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org, stefanha@gmail.com,
	Xiaojuan Yang <yangxiaojuan@loongson.cn>
Subject: [PULL for 7.2-rc2 1/3] hw/loongarch: Add default stdout uart in fdt
Date: Tue, 22 Nov 2022 21:10:25 +0800	[thread overview]
Message-ID: <20221122131027.1250769-2-gaosong@loongson.cn> (raw)
In-Reply-To: <20221122131027.1250769-1-gaosong@loongson.cn>

From: Xiaojuan Yang <yangxiaojuan@loongson.cn>

Add "chosen" subnode into LoongArch fdt, and set it's
"stdout-path" prop to uart node.

Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20221115114923.3372414-1-yangxiaojuan@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
---
 hw/loongarch/virt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 5136940b0b..b9c18ee517 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -69,6 +69,7 @@ static void fdt_add_uart_node(LoongArchMachineState *lams)
     qemu_fdt_setprop_string(ms->fdt, nodename, "compatible", "ns16550a");
     qemu_fdt_setprop_cells(ms->fdt, nodename, "reg", 0x0, base, 0x0, size);
     qemu_fdt_setprop_cell(ms->fdt, nodename, "clock-frequency", 100000000);
+    qemu_fdt_setprop_string(ms->fdt, "/chosen", "stdout-path", nodename);
     g_free(nodename);
 }
 
@@ -87,6 +88,7 @@ static void create_fdt(LoongArchMachineState *lams)
                             "linux,dummy-loongson3");
     qemu_fdt_setprop_cell(ms->fdt, "/", "#address-cells", 0x2);
     qemu_fdt_setprop_cell(ms->fdt, "/", "#size-cells", 0x2);
+    qemu_fdt_add_subnode(ms->fdt, "/chosen");
 }
 
 static void fdt_add_cpu_nodes(const LoongArchMachineState *lams)
-- 
2.31.1



  reply	other threads:[~2022-11-22 13:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 13:10 [PULL for 7.2-rc2 0/3] loongarch for 7.2-rc2 patches Song Gao
2022-11-22 13:10 ` Song Gao [this message]
2022-11-22 13:10 ` [PULL for 7.2-rc2 2/3] hw/loongarch: Fix setprop_sized method in fdt rtc node Song Gao
2022-11-22 13:10 ` [PULL for 7.2-rc2 3/3] hw/loongarch: Replace the value of uart info with macro Song Gao
2022-11-22 17:09 ` [PULL for 7.2-rc2 0/3] loongarch for 7.2-rc2 patches Stefan Hajnoczi
2022-11-24 12:30   ` gaosong
2022-11-24 12:44     ` Daniel P. Berrangé
2022-11-24 12:52       ` gaosong

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=20221122131027.1250769-2-gaosong@loongson.cn \
    --to=gaosong@loongson.cn \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@gmail.com \
    --cc=yangxiaojuan@loongson.cn \
    /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).