qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/3] hw/sd/pxa2xx_mmci: convert to SysBusDevice


From: Kevin O'Connor
Subject: Re: [Qemu-devel] [PATCH 1/3] hw/sd/pxa2xx_mmci: convert to SysBusDevice object
Date: Fri, 4 Dec 2015 14:24:01 -0500
User-agent: Mutt/1.5.24 (2015-08-30)

On Fri, Dec 04, 2015 at 10:50:21AM -0800, Peter Crosthwaite wrote:
> > FWIW, I don't think the SD card will be qdevified because it doesn't
> > need a bus.  It's similar indeed to SerialState, which was supposed to
> > be the poster child of QOM embedding and never got QOMified.
> 
> SD is a bus in its own right and should be busified and QOMified IMO.
> SDHCI can talk to non-sd cards (SDIO). There is also a range of
> incompatible cards that you can talk to - MMC/eMMC/SD(H|S|X)C. I think
> anything that couples the controller to an SD card is a bug, the card
> and device should be arranged as separate devices.
> 
> > A host controller controls exactly one SD card, the SSI bridge is also
> > for exactly one SD card, etc.
> 
> I think you can RYO chip selects with a GPIO and control multiple SD
> cards with one SDHCI.

In practice, the SDHCI controllers are one-to-one with cards.  This is
codified in the sdhci spec as it has a "card present" bit and "port
location" information that is per controller.

I suppose in theory, one could put an SDHCI contoller into SPI
compatibility mode and "hot wire" it into a bus, but qemu doesn't
support that anyway, and it is a lot of complexity for something that
is not done in practice.

-Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]