qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 5/6] xlnx-zynqmp: Connect the SPI devices


From: Alistair Francis
Subject: Re: [Qemu-devel] [PATCH v6 5/6] xlnx-zynqmp: Connect the SPI devices
Date: Fri, 15 Jan 2016 13:32:39 -0800

On Fri, Jan 15, 2016 at 7:21 AM, Peter Maydell <address@hidden> wrote:
> On 7 January 2016 at 15:55, Peter Maydell <address@hidden> wrote:
>> On 20 December 2015 at 05:43, Peter Crosthwaite
>> <address@hidden> wrote:
>>> +    for (i = 0; i < XLNX_ZYNQMP_NUM_SPIS; i++) {
>>> +        char bus_name[6];
>>> +
>>> +        object_property_set_bool(OBJECT(&s->spi[i]), true, "realized", 
>>> &err);
>>> +
>>> +        sysbus_mmio_map(SYS_BUS_DEVICE(&s->spi[i]), 0, spi_addr[i]);
>>> +        sysbus_connect_irq(SYS_BUS_DEVICE(&s->spi[i]), 0,
>>> +                           gic_spi[spi_intr[i]]);
>>> +
>>> +        /* Alias controller SPI bus to the SoC itself */
>>> +        snprintf(bus_name, 6, "spi%d", i);
>>
>> I don't much like these hard coded 6s. This is in init which
>> isn't a hot path, so the simplest thing is to use g_strdup_printf()
>> and then g_free() it when we're done.
>>
>> Similarly in patch 6.
>>
>> Otherwise I like this; I did a quick tweak to my sd card patchset
>> to use this approach and it seems to at least compile and do
>> the right thing in info qtree (I don't have a xilinx test image
>> to do more).
>>
>> Haven't looked at the detail of how we're doing this in patch 1 yet.
>
> Hi Peter (and/or Alistair) -- do you have time to do a quick respin
> of this patchset to use g_strdup_printf() in these cases? It would
> be nice to get this series into the tree, because my sd card rework
> patchset depends on it...

Yep! I'll do it now.

Thanks,

Alistair

>
> thanks
> -- PMM
>



reply via email to

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