qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: vineshp@xilinx.com, Peter Maydell <peter.maydell@linaro.org>,
	john.williams@xilinx.com, qemu-devel@nongnu.org,
	edgar.iglesias@gmail.com
Subject: Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers
Date: Thu, 25 Oct 2012 15:14:27 +0200	[thread overview]
Message-ID: <50893B33.5000908@redhat.com> (raw)
In-Reply-To: <CAEgOgz7ey4EXFEuVfb3DtDV7RTX8+kQ=d5Yir9icBAfaYN7-Yg@mail.gmail.com>

On 10/25/12 14:56, Peter Crosthwaite wrote:
> On Thu, Oct 25, 2012 at 10:16 PM, Peter Maydell
> <peter.maydell@linaro.org> wrote:
>> On 25 October 2012 13:12, Gerd Hoffmann <kraxel@redhat.com> wrote:
>>>> +static inline void zynq_init_usb(uint32_t base_addr, qemu_irq irq)
>>>> +{
>>>> +    DeviceState *dev = qdev_create(NULL, "ehci-sysbus");
>>>
>>> I'd suggest to have a "ehci-sysbus-zynq" device instead which sets
>>> capsbase & opregbase in ->init() ...
>>>
>>>> +    qdev_prop_set_uint16(dev, "capabase", 0x100);
>>>> +    qdev_prop_set_uint32(dev, "opregbase", 0x140);
>>>
>>> ... then drop these lines.
>>
>> That sounds weird to me -- properties are exactly the mechanism
>> for having a device which is configurable. Why have two differently
>> named devices which only differ in the value of a configurable
>> property?

> Yes I agree. Creating a now QOM definition for every variant of a
> device is tedious. EHCI provides a nice abstraction which should not
> have awareness of its particular implementations.

Maybe "zynq" is the wrong abstraction and this should be named by the
actual ehci chip implementation (which could be the same for a bunch of
sysbus boards).

But, yes, different chips should have different QOM definitions.  Like
we have a bunch of different uhci variants with a QOM definition for
each of them.

cheers,
  Gerd

  reply	other threads:[~2012-10-25 13:14 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25  9:47 [Qemu-devel] [PATCH v1 0/8] Sysbus EHCI + Zynq USB Peter Crosthwaite
2012-10-25  9:47 ` [Qemu-devel] [PATCH v1 1/8] usb/ehci: parameterise the register region offsets Peter Crosthwaite
2012-10-25 12:04   ` Gerd Hoffmann
2012-10-25  9:47 ` [Qemu-devel] [PATCH v1 2/8] usb/ehci: Abstract away PCI DMA API Peter Crosthwaite
2012-10-25  9:47 ` [Qemu-devel] [PATCH v1 3/8] usb/ehci: seperate out PCIisms Peter Crosthwaite
2012-10-25 12:08   ` Gerd Hoffmann
2012-10-25 12:44     ` Peter Crosthwaite
2012-10-25 12:57       ` Gerd Hoffmann
2012-10-25 13:19         ` Peter Crosthwaite
2012-10-25  9:47 ` [Qemu-devel] [PATCH v1 4/8] usb/ehci: Add usb-ehci-sysbus Peter Crosthwaite
2012-10-25  9:55   ` Peter Maydell
2012-10-25 13:17     ` Avi Kivity
2012-10-25 12:10   ` Gerd Hoffmann
2012-10-25 12:39     ` Peter Crosthwaite
2012-10-25  9:47 ` [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers Peter Crosthwaite
2012-10-25 12:12   ` Gerd Hoffmann
2012-10-25 12:16     ` Peter Maydell
2012-10-25 12:56       ` Peter Crosthwaite
2012-10-25 13:14         ` Gerd Hoffmann [this message]
2012-10-25 13:24           ` Peter Crosthwaite
2012-10-25 13:49             ` Gerd Hoffmann
2012-10-25 14:10               ` Gerd Hoffmann
2012-10-25 23:54                 ` Peter Crosthwaite
2012-10-25 23:59                   ` Peter Crosthwaite
2012-10-26  6:49                     ` Gerd Hoffmann
2012-10-26  6:59                       ` Peter Crosthwaite
2012-10-25  9:47 ` [Qemu-devel] [PATCH v1 6/8] usb/ehci: Guard definition of EHCI_DEBUG Peter Crosthwaite
2012-10-25  9:47 ` [Qemu-devel] [PATCH v1 7/8] usb/ehci: Debug mode compile fixes Peter Crosthwaite
2012-10-25  9:47 ` [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions Peter Crosthwaite
2012-10-25 12:19   ` Gerd Hoffmann
2012-10-25 13:03     ` Peter Crosthwaite
2012-10-25 13:12       ` Peter Maydell
2012-10-25 13:21         ` Avi Kivity
2012-10-25 13:28           ` Peter Maydell
2012-10-25 13:41             ` Avi Kivity
2012-10-25 13:50               ` Peter Maydell
2012-10-25 13:57                 ` Avi Kivity
2012-10-25 13:59                 ` Peter Crosthwaite
2012-10-25 14:08                   ` Peter Maydell
2012-10-25 13:20       ` Avi Kivity
2012-10-29 14:08 ` [Qemu-devel] [PATCH v1 0/8] Sysbus EHCI + Zynq USB Peter Crosthwaite
2012-10-30  7:20   ` Gerd Hoffmann
2012-10-30  8:24     ` Peter Crosthwaite
2012-10-30 10:30       ` Gerd Hoffmann
2012-10-30 12:14       ` Andreas Färber

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=50893B33.5000908@redhat.com \
    --to=kraxel@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=john.williams@xilinx.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vineshp@xilinx.com \
    /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).