mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
hw/sd: Introduce a "sd-card" SPI variant model
and replace the SDState::spi attribute with a test checking the SDProto array of commands. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
6380cd2052
commit
c3287c0f70
4 changed files with 45 additions and 18 deletions
|
@ -1235,9 +1235,8 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board)
|
|||
|
||||
dinfo = drive_get(IF_SD, 0, 0);
|
||||
blk = dinfo ? blk_by_legacy_dinfo(dinfo) : NULL;
|
||||
carddev = qdev_new(TYPE_SD_CARD);
|
||||
carddev = qdev_new(TYPE_SD_CARD_SPI);
|
||||
qdev_prop_set_drive_err(carddev, "drive", blk, &error_fatal);
|
||||
qdev_prop_set_bit(carddev, "spi", true);
|
||||
qdev_realize_and_unref(carddev,
|
||||
qdev_get_child_bus(sddev, "sd-bus"),
|
||||
&error_fatal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue