qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7 00/14] SDHCI: housekeeping (part 1)


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v7 00/14] SDHCI: housekeeping (part 1)
Date: Mon, 15 Jan 2018 13:24:56 -0300

On Mon, Jan 15, 2018 at 1:22 PM, Paolo Bonzini <address@hidden> wrote:
> On 15/01/2018 16:17, Philippe Mathieu-Daudé wrote:
>>
>> The only 2 properties specific to sysbus are:
>>
>> static Property sdhci_sysbus_properties[] = {
>>     DEFINE_PROP_BOOL("pending-insert-quirk", SDHCIState, 
>> pending_insert_quirk,
>>                      false),
>>     DEFINE_PROP_LINK("dma", SDHCIState, dma_mr,
>>                      TYPE_MEMORY_REGION, MemoryRegion *),
>> }
>>
>> I guess I assumed the Property to be const (being compilation-time
>> allocated, ended with DEFINE_PROP_END_OF_LIST),
>> so I couldn't add more properties to it, but it seems each device has
>> his properties allocated at runtime, so I can use the same
>> sdhci_common_properties[] array and only use
>> qdev_property_add_static() for the 2 sysbus specific properties.
>
> You can define a macro DEFINE_SDHCI_PROPERTIES for the "common" properties.

Clever :)

Thanks Paolo!

Phil.



reply via email to

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