[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 05/11] usb/ehci: seperate out PCIisms
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH v2 05/11] usb/ehci: seperate out PCIisms |
Date: |
Mon, 29 Oct 2012 11:04:40 +1000 |
On Sat, Oct 27, 2012 at 10:32 AM, Peter Crosthwaite
<address@hidden> wrote:
> On Fri, Oct 26, 2012 at 10:24 PM, Gerd Hoffmann <address@hidden> wrote:
>> Hi,
>>
>>> +typedef struct EHCItfState {
>>> + union {
>>> + PCIDevice pcidev;
>>> + };
>>> + struct EHCIState ehci;
>>> +} EHCIItfState;
>>
>> I still think we should have EHCIPCIState here, then add a
>> EHCISysbusState variant for sysbus. Everybody else does it this way
>> (ohci, esp, serial, ...) and I'd like ehci follow.
>
In the interest of hopefully getting something merged before freeze I
had remade it this way (With EHCIPCIState). Can revisit this code
replication issue another day. v3 will be up shortly.
Regards,
Peter
> There still has to be a way to share the Property[] array (currently
> contains maxframes). Duplicating the properties array to all
> definitions is verbose and fragile. If I want to add a new properties
> to EHCI i need to put it in the props array of every subclass. serial
> has this problem, with the "chardev" prop appearing in both isa and
> pci variants (and the device variant out of tree that Anthony has). If
> we decide to add a new prop to serial we have to DEFINE_PROP_FOO it 3
> times.
>
> Whats the real answer here? Can we get the shared init function to add
> to properties explicify? Blow away the dc->properties = foo and
> replace with code that parses to prop array?
>
> I just think its a false economy to have to replicate your code for
> the sake of the anit-union movement,
>
> Regards,
> Peter
>
> Also makes it easier
>> to split the source code into core, pci and sysbus pieces, i.e. move all
>> the pci bits to hcd-ehci-pci.c and compile only for targets with pci
>> support.
>>
>> cheers,
>> Gerd
>>
>>
- [Qemu-devel] [PATCH v2 00/11] Sysbus EHCI + Zynq USB., Peter Crosthwaite, 2012/10/26
- [Qemu-devel] [PATCH v2 01/11] dma: Define dma_context_memory and use in sysbus-ohci, Peter Crosthwaite, 2012/10/26
- [Qemu-devel] [PATCH v2 02/11] usb/ehci: Use class_data to init PCI variations, Peter Crosthwaite, 2012/10/26
- [Qemu-devel] [PATCH v2 03/11] usb/ehci: parameterise the register region offsets, Peter Crosthwaite, 2012/10/26
- [Qemu-devel] [PATCH v2 04/11] usb/ehci: Abstract away PCI DMA API, Peter Crosthwaite, 2012/10/26
- [Qemu-devel] [PATCH v2 05/11] usb/ehci: seperate out PCIisms, Peter Crosthwaite, 2012/10/26
- [Qemu-devel] [PATCH v2 06/11] usb/ehci: Add Sysbus Infrastructure, Peter Crosthwaite, 2012/10/26
- [Qemu-devel] [PATCH v2 07/11] usb/ehci: Add Xilinx ps7 USB controller, Peter Crosthwaite, 2012/10/26
- [Qemu-devel] [PATCH v2 09/11] usb/ehci: Guard definition of EHCI_DEBUG, Peter Crosthwaite, 2012/10/26
- [Qemu-devel] [PATCH v2 11/11] usb/ehci: Put RAM in undefined MMIO regions, Peter Crosthwaite, 2012/10/26