mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
sdhci: Pass drive parameter to sdhci-pci via qdev property
Commit 19109131
disabled the sdhci-pci support because it used
drive_get_next(). This patch reenables sdhci-pci and changes it to
pass the drive via a qdev property - for example:
-device sdhci-pci,drive=drive0 -drive id=drive0,if=sd,file=myimage
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
b37686f7e8
commit
5ec911c30f
3 changed files with 24 additions and 14 deletions
|
@ -492,7 +492,9 @@ SDState *sd_init(BlockBackend *blk, bool is_spi)
|
|||
sd->blk = blk;
|
||||
sd_reset(sd);
|
||||
if (sd->blk) {
|
||||
blk_attach_dev_nofail(sd->blk, sd);
|
||||
/* Attach dev if not already attached. (This call ignores an
|
||||
* error return code if sd->blk is already attached.) */
|
||||
blk_attach_dev(sd->blk, sd);
|
||||
blk_set_dev_ops(sd->blk, &sd_block_ops, sd);
|
||||
}
|
||||
vmstate_register(NULL, -1, &sd_vmstate, sd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue