qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Clement Deschamps <clement.deschamps@antfield.fr>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	"Andrew Baumann" <andrew.baumann@microsoft.com>,
	"Grégory ESTRADE" <gregory.estrade@gmail.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] add bcm2835 sdhost controller to bcm2835 platform
Date: Tue, 21 Feb 2017 10:59:46 +0000	[thread overview]
Message-ID: <CAFEAcA-XkD3RRswf97Zg2phEdJScSYHnTjLmt__xe=+pLedvcw@mail.gmail.com> (raw)
In-Reply-To: <20170220173430.31630-1-clement.deschamps@antfield.fr>

On 20 February 2017 at 17:34, Clement Deschamps
<clement.deschamps@antfield.fr> 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

      parent reply	other threads:[~2017-02-21 11:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 17:34 [Qemu-devel] [PATCH 0/2] add bcm2835 sdhost controller to bcm2835 platform Clement Deschamps
2017-02-20 17:34 ` [Qemu-devel] [PATCH 1/2] bcm2835_sdhost: add bcm2835 sdhost controller Clement Deschamps
2017-02-20 17:34 ` [Qemu-devel] [PATCH 2/2] bcm2835: add bcm2835_sdhost to bcm2835 platform Clement Deschamps
2017-02-21 18:59   ` Andrew Baumann
2017-02-21 10:59 ` Peter Maydell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA-XkD3RRswf97Zg2phEdJScSYHnTjLmt__xe=+pLedvcw@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=andrew.baumann@microsoft.com \
    --cc=clement.deschamps@antfield.fr \
    --cc=gregory.estrade@gmail.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).