From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Igor Mitsyanko" <i.mitsyanko@gmail.com>,
"Kevin Wolf" <kwolf@redhat.com>, "Max Reitz" <mreitz@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"open list:Block layer core" <qemu-block@nongnu.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
Alistair Francis <alistair@alistair23.me>,
Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Subject: Re: [Qemu-devel] cmdline: How to connect a SD card to a specific SD controller?
Date: Wed, 30 May 2018 07:28:33 +0200 [thread overview]
Message-ID: <f7ae3b8e-c5ca-53b0-aef8-a4abdf58a29d@redhat.com> (raw)
In-Reply-To: <b19a920d-8c47-d018-6a2a-f2c43facd88e@amsat.org>
[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]
On 30.05.2018 01:08, Philippe Mathieu-Daudé wrote:
> On 05/28/2018 01:30 AM, Philippe Mathieu-Daudé wrote:
>> Hi,
>>
>> I'd like to connect a specific SD card to a specific SDHCI from command
>> line, and I'm getting a bit lost with command line options.
>>
>> I'm using an updated version of this patch, but this is not relevant to
>> this thread:
>> http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg01914.html
>>
>> In the following example, I'd like to connect an UHS-I enabled SD card
>> to the first SHDCI of the Exynos4210 board (Nuri).
>>
>> I tried:
>>
>> $ ./arm-softmmu/qemu-system-arm -M nuri \
>> -device sd-card,id=sd0,uhs=1 \
>> -drive if=sd,id=sd0,driver=null-co,size=4G \
>> -monitor stdio -S
>
> Peter suggested on IRC to use:
>
> -drive if=none,id=mydrive,... -device sd-card,...,drive=mydrive
>
> which indeed works enough for my tests:
>
> $ ./arm-softmmu/qemu-system-arm -M nuri \
> -drive if=none,id=mydrive,driver=null-co,size=4G \
> -device sd-card,id=sd0,uhs=1,drive=mydrive \
> -monitor stdio -S
>
> The same issues are still here but don't bother:
>
> (qemu) info qtree
> bus: main-system-bus
> type System
> dev: generic-sdhci, id ""
> gpio-out "sysbus-irq" 1
> sd-spec-version = 2 (0x2)
> uhs = 0 (0x0)
> capareg = 99090560 (0x5e80080)
> maxcurr = 0 (0x0)
> pending-insert-quirk = false
> dma = ""
> mmio 0000000012540000/0000000000000100
> bus: sd-bus
> type sdhci-bus
> dev: sd-card, id "sd0"
> drive = "mydrive"
> spi = false
> uhs = 1 (0x1)
> dev: sd-card, id ""
> drive = ""
> spi = false
> uhs = 0 (0x0)
>
> ^---- 2 cards
Looks like the nuri board always creates an sd-card by default? You
could try to change exynos4210_init() to only create it if
drive_get(IF_SD, ...) is not returning NULL - then it should be possible
to disable it with "-nodefaults".
Thomas
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2018-05-30 5:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 4:30 [Qemu-devel] cmdline: How to connect a SD card to a specific SD controller? Philippe Mathieu-Daudé
2018-05-29 23:08 ` Philippe Mathieu-Daudé
2018-05-30 5:28 ` Thomas Huth [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=f7ae3b8e-c5ca-53b0-aef8-a4abdf58a29d@redhat.com \
--to=thuth@redhat.com \
--cc=alistair@alistair23.me \
--cc=f4bug@amsat.org \
--cc=i.mitsyanko@gmail.com \
--cc=kwolf@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sai.pavan.boddu@xilinx.com \
/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).