On 23/03/2015 16:01, Peter Crosthwaite wrote:
> Note that SD has a SPI mode, every SD card is in theory a valid SSI
> device. We could unify SD under SSI to achieve both QOMification and
> busification.

That wouldn't really be the way most SD cards work, anyway.  The
protocol doesn't do simultaneous bidirectional transfers like SSI does.

With your proposal the right way to invoke sdhci-pci would be "-device
sdhci-pci,id=sdhci -drive if=none,...,id=sd -device
sd,drive=sd,bus=sdhci.0".

Similarly, instantiating an SD card on an SSI bus would be "-device
ssi-sd,id=ssisd -drive if=none,...,id=sd -device sd,drive=sd,bus=ssisd.0".

> I would then expect the block setup of sd.c to be very similar to
> hw/block/m25p80.c (SPI flash).

Absolutely not, hw/block/m25p80.c has the same issue of doing
drive_get_next in the realize function.

Paolo

Reply via email to