From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Igor Mitsyanko" <i.mitsyanko@gmail.com>,
"Alistair Francis" <alistair@alistair23.me>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Jean-Christophe Dubois" <jcd@tribudubois.net>,
qemu-arm@nongnu.org,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: [PATCH-for-5.2? 3/4] hw/arm/xlnx-versal: Add SD bus QOM alias on the SoC
Date: Tue, 24 Nov 2020 10:49:40 +0100 [thread overview]
Message-ID: <20201124094941.485767-4-f4bug@amsat.org> (raw)
In-Reply-To: <20201124094941.485767-1-f4bug@amsat.org>
To be able to select a particular SD bus from the command
line, add a QOM alias on the SoC (using an unique name).
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/arm/xlnx-versal.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c
index 12ba6c4ebae..da3ee24a5b9 100644
--- a/hw/arm/xlnx-versal.c
+++ b/hw/arm/xlnx-versal.c
@@ -210,6 +210,7 @@ static void versal_create_sds(Versal *s, qemu_irq *pic)
int i;
for (i = 0; i < ARRAY_SIZE(s->pmc.iou.sd); i++) {
+ g_autofree char *bus_name = NULL;
DeviceState *dev;
MemoryRegion *mr;
@@ -224,6 +225,10 @@ static void versal_create_sds(Versal *s, qemu_irq *pic)
object_property_set_uint(OBJECT(dev), "uhs", UHS_I, &error_fatal);
sysbus_realize(SYS_BUS_DEVICE(dev), &error_fatal);
+ /* Alias controller SD bus to the SoC itself */
+ bus_name = g_strdup_printf("sd-bus%d", i);
+ object_property_add_alias(OBJECT(s), bus_name, OBJECT(dev), "sd-bus");
+
mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0);
memory_region_add_subregion(&s->mr_ps,
MM_PMC_SD0 + i * MM_PMC_SD0_SIZE, mr);
--
2.26.2
next prev parent reply other threads:[~2020-11-24 9:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 9:49 [PATCH-for-5.2? 0/4] hw/arm: Add SD bus QOM alias on the machine/soc Philippe Mathieu-Daudé
2020-11-24 9:49 ` [PATCH-for-5.2? 1/4] hw/arm/fsl-imx: Add SD bus QOM alias on the SoC Philippe Mathieu-Daudé
2020-12-01 1:56 ` Alistair Francis
2020-11-24 9:49 ` [PATCH-for-5.2? 2/4] hw/arm/exynos4210: " Philippe Mathieu-Daudé
2020-12-01 1:51 ` Alistair Francis
2020-11-24 9:49 ` Philippe Mathieu-Daudé [this message]
2020-12-01 1:55 ` [PATCH-for-5.2? 3/4] hw/arm/xlnx-versal: " Alistair Francis
2020-11-24 9:49 ` [PATCH-for-5.2? 4/4] hw/arm/xilinx_zynq: Add SD bus QOM alias on the machine Philippe Mathieu-Daudé
2020-12-01 1:55 ` Alistair Francis
2020-12-01 13:20 ` [PATCH-for-5.2? 0/4] hw/arm: Add SD bus QOM alias on the machine/soc Peter Maydell
2023-07-09 8:31 ` Bernhard Beschow
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=20201124094941.485767-4-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=alistair@alistair23.me \
--cc=edgar.iglesias@gmail.com \
--cc=i.mitsyanko@gmail.com \
--cc=jcd@tribudubois.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).