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? 2/4] hw/arm/exynos4210: Add SD bus QOM alias on the SoC
Date: Tue, 24 Nov 2020 10:49:39 +0100 [thread overview]
Message-ID: <20201124094941.485767-3-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/exynos4210.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
index ced2769b102..a60f08d372a 100644
--- a/hw/arm/exynos4210.c
+++ b/hw/arm/exynos4210.c
@@ -408,6 +408,7 @@ static void exynos4210_realize(DeviceState *socdev, Error **errp)
/*** SD/MMC host controllers ***/
for (n = 0; n < EXYNOS4210_SDHCI_NUMBER; n++) {
+ g_autofree char *bus_name = NULL;
DeviceState *carddev;
BlockBackend *blk;
DriveInfo *di;
@@ -432,6 +433,10 @@ static void exynos4210_realize(DeviceState *socdev, Error **errp)
sysbus_mmio_map(busdev, 0, EXYNOS4210_SDHCI_ADDR(n));
sysbus_connect_irq(busdev, 0, s->irq_table[exynos4210_get_irq(29, n)]);
+ /* Alias controller SD bus to the SoC itself */
+ bus_name = g_strdup_printf("sd-bus%d", n);
+ object_property_add_alias(OBJECT(s), bus_name, OBJECT(dev), "sd-bus");
+
di = drive_get(IF_SD, 0, n);
blk = di ? blk_by_legacy_dinfo(di) : NULL;
carddev = qdev_new(TYPE_SD_CARD);
--
2.26.2
next prev parent reply other threads:[~2020-11-24 9:56 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 ` Philippe Mathieu-Daudé [this message]
2020-12-01 1:51 ` [PATCH-for-5.2? 2/4] hw/arm/exynos4210: " Alistair Francis
2020-11-24 9:49 ` [PATCH-for-5.2? 3/4] hw/arm/xlnx-versal: " Philippe Mathieu-Daudé
2020-12-01 1:55 ` 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-3-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).