Received: from eggs.gnu.org ([2001:4830:134:3::10]:52205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfBw-0001SI-J2 for qemu-devel@nongnu.org; Wed, 07 Sep 2016 11:55:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhfBr-0001r2-Jr for qemu-devel@nongnu.org; Wed, 07 Sep 2016 11:55:11 -0400 Received: from 6.mo173.mail-out.ovh.net ([46.105.43.93]:35166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfBr-0001pS-El for qemu-devel@nongnu.org; Wed, 07 Sep 2016 11:55:07 -0400 Received: from player711.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id 5F163100CC54 for ; Wed, 7 Sep 2016 17:55:06 +0200 (CEST) References: <1472661255-20160-1-git-send-email-clg@kaod.org> <1472661255-20160-4-git-send-email-clg@kaod.org> <20160905033909.GA3816@voom.fritz.box> <1473059513.2313.44.camel@kernel.crashing.org> <20160906004847.GB2900@voom.fritz.box> <3af4c2d9-7263-7c54-0a12-c0b4108c65bd@kaod.org> <1473198436.8689.38.camel@kernel.crashing.org> <1473198550.8689.40.camel@au1.ibm.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: Date: Wed, 7 Sep 2016 17:55:01 +0200 MIME-Version: 1.0 In-Reply-To: <1473198550.8689.40.camel@au1.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: benh@au1.ibm.com, David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf On 09/06/2016 11:49 PM, Benjamin Herrenschmidt wrote: > On Wed, 2016-09-07 at 07:47 +1000, Benjamin Herrenschmidt wrote: >> d be an extra op in the xscom device model I guess. >> >> No. If you split the XSCOM bus from the MMIO -> XSCOM bridge (the >> ADU) >> then the conversion only happens in the former. You don't directly >> route the MMIOs over ! You intercept the MMIOs and use use the >> address_space_rw to "generate" the XSCOM accesses on the other side, >> like I do for the LPC bus. >> >> We need that anyway because of the way XSCOMs can manipulate the HMER >> etc... >> >>> >>> Also, the main purpose of the XscomBus is to loop on the devices >>> to populate the device tree. I am wondering if we could just use >>> a simple list under the chip for that purpose. > > In fact, if you do the above, you no longer need a XSCOM device... > > A number of "devices" can exist below a chip, all they need to have > XSCOMs is to register memory regions that are child of that chip's > xscom_region. yes. To hack my way through again, I have added a memory region under the XScomDevice, but we should have a list like the ranges[] because of the PHB3 PCBQs. > For device-tree, well, we could have a generic interface that anything > that can populate DT has and iterate through them. Or make a "chiplet" > class or something. yes, something like the XScomDeviceClass, which serves well the purpose anyhow. Thanks, C. > Cheers, > Ben. >