From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SleCb-00054j-HC for qemu-devel@nongnu.org; Mon, 02 Jul 2012 06:50:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SleCW-0006fc-Q1 for qemu-devel@nongnu.org; Mon, 02 Jul 2012 06:49:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SleCW-0006fH-Hu for qemu-devel@nongnu.org; Mon, 02 Jul 2012 06:49:52 -0400 Message-ID: <4FF17CC4.5010608@redhat.com> Date: Mon, 02 Jul 2012 12:49:40 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <4FE8371B.4020503@suse.de> <4FE874EC.3090307@codemonkey.ws> In-Reply-To: <4FE874EC.3090307@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] Attaching EHCI to sysbus. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Anthony Liguori , qemu-devel , Peter Crosthwaite , "Edgar E. Iglesias" , Paolo Bonzini , =?ISO-8859-1?Q?Andreas_F=E4rber?= , 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