* Re: [Qemu-devel] [RFC] Attaching EHCI to sysbus.
[not found] ` <4FE874EC.3090307@codemonkey.ws>
@ 2012-07-02 10:49 ` Gerd Hoffmann
0 siblings, 0 replies; only message in thread
From: Gerd Hoffmann @ 2012-07-02 10:49 UTC (permalink / raw)
To: Anthony Liguori
Cc: Anthony Liguori, qemu-devel, Peter Crosthwaite, Edgar E. Iglesias,
Paolo Bonzini, Andreas Färber, John Williams, David Gibson
Hi,
> Does it make sense to have an EHCI bus type that inherits from USBBus?
>
> That way we could change USBPortOps into methods of the USBBus that the
> subclass overrides.
I don't think this is useful. USBPortOps should be identical for both
cases.
> That would strongly decouple the EHCI code from the PCI device. Then
> the ehci-pci device just needs to setup the EHCI bus and forward MMIO
> requests appropriately.
I think what we need to do is:
(1) Create EHCIPCIState, which holds just PCIDevice and EHCIState.
(2) Setup dma context in pci init function, then switch over all
memory access from pci_* to dma_* (simliar to ohci).
Generic ehci code should not have any pci references any more then. Now:
(3) create EHCISysbusState, hook up sysbus init function which does
mmio registration, dma context setup and irq windup the sysbus
way.
cheers,
Gerd
^ permalink raw reply [flat|nested] only message in thread