qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* 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

only message in thread, other threads:[~2012-07-02 10:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAEgOgz56OypbOE+ejwftpbBuL0eooZBcytN4D8p+149FS_aadw@mail.gmail.com>
     [not found] ` <4FE8371B.4020503@suse.de>
     [not found]   ` <4FE874EC.3090307@codemonkey.ws>
2012-07-02 10:49     ` [Qemu-devel] [RFC] Attaching EHCI to sysbus Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).