From: Gerd Hoffmann <kraxel@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Peter Crosthwaite" <peter.crosthwaite@petalogix.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
"John Williams" <john.williams@petalogix.com>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [RFC] Attaching EHCI to sysbus.
Date: Mon, 02 Jul 2012 12:49:40 +0200 [thread overview]
Message-ID: <4FF17CC4.5010608@redhat.com> (raw)
In-Reply-To: <4FE874EC.3090307@codemonkey.ws>
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
parent reply other threads:[~2012-07-02 10:50 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <4FE874EC.3090307@codemonkey.ws>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FF17CC4.5010608@redhat.com \
--to=kraxel@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=david@gibson.dropbear.id.au \
--cc=edgar.iglesias@gmail.com \
--cc=john.williams@petalogix.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@petalogix.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).