[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 0/2] add bcm2835 sdhost controller to bcm2835 plat
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [PATCH 0/2] add bcm2835 sdhost controller to bcm2835 platform |
Date: |
Tue, 21 Feb 2017 10:59:46 +0000 |
On 20 February 2017 at 17:34, Clement Deschamps
<address@hidden> wrote:
> This patches add the Arasan SD controller to the BCM2835/36 platforms.
Cool!
> On the real hardware, both SD controllers are wired to the same SD card.
> Selection is done via multi-function pins through the GPIO controller. I'm
> not
> sure what would be the good solution to emulate this in QEMU. For now on we
> pass two sd cards on the command line which is not ideal.
That's unfortunate. I think we definitely need to fix this before we
can take the controller support into QEMU, because of the user-visible
effects on the required QEMU command line syntax.
I wonder if we can model this by effectively ejecting the card from
one SDBus and inserting it into the other when the GPIO controller
setting is configured. I think the way we want to do this is to
remove the SDState object from one SDBus qbus and insert it into
the other -- the functions in hw/sd/core.c all already cope with
"there's no card on this bus".
This might be a bit awkward because we effectively want to do a
hotplug/hot-unplug from our code but we don't want to expose to
the user that the device is hotpluggable. It may just be a matter
of doing an object_unparent() and then qdev_set_parent_bus() to move
the card object from one bus to the other... or it could get more
complicated.
thanks
-- PMM