On 25 October 2012 13:12, Gerd Hoffmann <[email protected]> wrote:
>> +static inline void zynq_init_usb(uint32_t base_addr, qemu_irq irq)
>> +{
>> +    DeviceState *dev = qdev_create(NULL, "ehci-sysbus");
>
> I'd suggest to have a "ehci-sysbus-zynq" device instead which sets
> capsbase & opregbase in ->init() ...
>
>> +    qdev_prop_set_uint16(dev, "capabase", 0x100);
>> +    qdev_prop_set_uint32(dev, "opregbase", 0x140);
>
> ... then drop these lines.

That sounds weird to me -- properties are exactly the mechanism
for having a device which is configurable. Why have two differently
named devices which only differ in the value of a configurable
property?

[I haven't looked at whether these specific properties make
sense or if there's some other higher-level-of-abstraction
knob that would be better to expose.)

-- PMM

Reply via email to