Am 25.01.2013 10:02, schrieb Gerd Hoffmann: >>> +static const MemoryRegionOps ehci_mmio_faraday_ops = { >>> + .read = ehci_faraday_read, >>> + .write = ehci_faraday_write, >>> + .valid.min_access_size = 4, >>> + .valid.max_access_size = 4, >>> + .endianness = DEVICE_LITTLE_ENDIAN, >>> +}; > > This should go to hcd-ehci-sysbus.c > >>> + memory_region_init_io(&s->mem_faraday, &ehci_mmio_faraday_ops, s, >>> + "faraday", 0x4c); >> >> I don't think this is good design... Can't you do the Faraday part from >> your own instance_init / initfn / realizefn function? > > Yes, please. Just add your own usb_ehci_sysbus_${board}_initfn, call > usb_ehci_sysbus_initfn for the common stuff, then add your > hardware-specific memory region.
I submitted a patch to facilitate this a little for you: http://patchwork.ozlabs.org/patch/215919/ Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg