qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/sd/sdcard: Allow user creation of eMMCs
@ 2024-10-15 13:56 Jan Luebbe
  2024-10-15 15:00 ` Philippe Mathieu-Daudé
  2024-10-18 15:42 ` Peter Maydell
  0 siblings, 2 replies; 10+ messages in thread
From: Jan Luebbe @ 2024-10-15 13:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Luebbe, Philippe Mathieu-Daudé, Bin Meng, qemu-block

For testing eMMC-specific functionality (such as handling boot
partitions), it would be very useful to attach them to generic VMs such
as x86_64 via the sdhci-pci device:
 ...
 -drive if=none,id=emmc-drive,file=emmc.img,format=raw \
 -device sdhci-pci \
 -device emmc,id=emmc0,drive=emmc-drive,boot-partition-size=1048576 \
 ...

While most eMMCs are soldered to boards, they can also be connected to
SD controllers with just a passive adapter, such as:
 https://docs.radxa.com/en/accessories/emmc-to-usd
 https://github.com/voltlog/emmc-wfbga153-microsd

The only change necessary to make the options above work is to avoid
disabling user_creatable, so do that. The SDHCI-PCI driver in the Linux
kernel already supports this just fine.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
 hw/sd/sd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index a5d2d929a8af..2d3467c3d956 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -2865,8 +2865,6 @@ static void emmc_class_init(ObjectClass *klass, void *data)
     dc->desc = "eMMC";
     dc->realize = emmc_realize;
     device_class_set_props(dc, emmc_properties);
-    /* Reason: Soldered on board */
-    dc->user_creatable = false;
 
     sc->proto = &sd_proto_emmc;
 
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-11-08 10:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15 13:56 [PATCH] hw/sd/sdcard: Allow user creation of eMMCs Jan Luebbe
2024-10-15 15:00 ` Philippe Mathieu-Daudé
2024-10-15 15:17   ` Cédric Le Goater
2024-10-15 15:20     ` Daniel P. Berrangé
2024-10-15 15:42       ` Cédric Le Goater
2024-10-18 15:42 ` Peter Maydell
2024-10-19 15:31   ` Philippe Mathieu-Daudé
2024-10-29 15:06   ` Peter Maydell
2024-11-08  9:29     ` Jan Lübbe
2024-11-08 10:47       ` Cédric Le Goater

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).