From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRNoR-0005Bh-Uz for qemu-devel@nongnu.org; Thu, 25 Oct 2012 09:49:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRNoL-0007a1-IA for qemu-devel@nongnu.org; Thu, 25 Oct 2012 09:49:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRNoL-0007Zt-8w for qemu-devel@nongnu.org; Thu, 25 Oct 2012 09:49:25 -0400 Message-ID: <50894360.906@redhat.com> Date: Thu, 25 Oct 2012 15:49:20 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <50892CB0.6020706@redhat.com> <50893B33.5000908@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: vineshp@xilinx.com, Peter Maydell , john.williams@xilinx.com, qemu-devel@nongnu.org, edgar.iglesias@gmail.com Hi, >>> 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. > > Can we at least take a data driven approach to this? Ahem. Well. I'd love to. It even used to be that way, before QOM. uhci had a simple PCIDeviceInfo table, with an entry for each variant. QOM turned that a bunch of class_init functions ... Looking a bit closer (at include/qemu/object.h): seems we can pass additional data to TypeInfo->class_init via TypeInfo->class_data. That should help here. I'll go try that to simplify uhci ... cheers, Gerd