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. Paolo