[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] cmdline: How to connect a SD card to a specific SD cont
From: |
Thomas Huth |
Subject: |
Re: [Qemu-block] cmdline: How to connect a SD card to a specific SD controller? |
Date: |
Wed, 30 May 2018 07:28:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
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
signature.asc
Description: OpenPGP digital signature