[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.
- [Qemu-devel] [PATCH v7 11/14] sdhci: fix CAPAB/MAXCURR registers, both are 64bit and read-only, (continued)
- [Qemu-devel] [PATCH v7 11/14] sdhci: fix CAPAB/MAXCURR registers, both are 64bit and read-only, Philippe Mathieu-Daudé, 2018/01/13
- [Qemu-devel] [PATCH v7 12/14] sdhci: Implement write method of ACMD12ERRSTS register, Philippe Mathieu-Daudé, 2018/01/13
- [Qemu-devel] [PATCH v7 14/14] sdhci: add a 'dma' property to the sysbus devices, Philippe Mathieu-Daudé, 2018/01/13
- [Qemu-devel] [PATCH v7 13/14] sdhci: fix the PCI device, using the PCI address space for DMA, Philippe Mathieu-Daudé, 2018/01/13
- Re: [Qemu-devel] [PATCH v7 00/14] SDHCI: housekeeping (part 1), Peter Maydell, 2018/01/15