qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 06/10] sdhci_sysbus: Create SD card device in us


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 06/10] sdhci_sysbus: Create SD card device in users, not the device itself
Date: Fri, 18 Dec 2015 09:00:54 +0000

On 18 December 2015 at 00:18, Alistair Francis
<address@hidden> wrote:
> On Fri, Dec 11, 2015 at 8:37 AM, Peter Maydell <address@hidden> wrote:
>>
>> +    /* Create and plug in the SD cards */
>> +    for (i = 0; i < XLNX_ZYNQMP_NUM_SDHCI; i++) {
>> +        BusState *bus;
>> +        DriveInfo *di = drive_get_next(IF_SD);
>> +        BlockBackend *blk = di ? blk_by_legacy_dinfo(di) : NULL;
>> +        DeviceState *carddev;
>> +
>> +        bus = qdev_get_child_bus(DEVICE(&s->soc.sdhci[i]), "sd-bus");
>
> This looks like the same thing I was trying to avoid with my SPI
> patches. We were trying to avoid the machine reaching into the SoC
> when getting the child busses. Instead expose the bus to the SoC so
> the board can just get it straight from there.

Yes, I wrote this code first and then saw your patches second.
Whatever we do, we should deal with the problem the same way.

thanks
-- PMM



reply via email to

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