qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] Attaching EHCI to sysbus.


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [RFC] Attaching EHCI to sysbus.
Date: Mon, 02 Jul 2012 12:49:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120601 Thunderbird/10.0.5

  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]