qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [4640] Enable SD card on creation.


From: andrzej zaborowski
Subject: Re: [Qemu-devel] [4640] Enable SD card on creation.
Date: Mon, 2 Jun 2008 15:43:56 +0200

On 02/06/2008, Paul Brook <address@hidden> wrote:
>  > void sd_enable(SDState *sd, int enable)
>
>  This shouldn't exist to start with. It should be using a qemu_irq, like the
>  other GPIO pins do, and probably wants to be implemented outside sd.c anyway.

Yes, that shouldn't be in sd.c.  We should be able to create a number
of SD cards and "insert" and "eject" them from the slots using monitor
commands or a chipselect pin driven by guest.

I partially did this in svn.openmoko.org qemu where we have SDIO cards
using the same slots as SD.

The root misconception is of whether BlockDriverState represents the
drive or the media.  In the cd-rom implementation the whole state
machine is in the drive and the media is just a piece of plastic.  In
MMC/SD the removable card has the entire state machine in it and using
bdrv_is_inserted() makes no sense anymore.
-- 
Please do not print this email unless absolutely necessary. Spread
environmental awareness.




reply via email to

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