Received: from eggs.gnu.org ([2001:4830:134:3::10]:46915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhOF7-0006PA-JZ for qemu-devel@nongnu.org; Tue, 06 Sep 2016 17:49:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhOF4-0003Cv-H5 for qemu-devel@nongnu.org; Tue, 06 Sep 2016 17:49:21 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhOF4-0003Ci-9G for qemu-devel@nongnu.org; Tue, 06 Sep 2016 17:49:18 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u86Llh2o013605 for ; Tue, 6 Sep 2016 17:49:17 -0400 Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by mx0a-001b2d01.pphosted.com with ESMTP id 25a2xxyu38-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 06 Sep 2016 17:49:16 -0400 Received: from localhost by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Sep 2016 07:49:14 +1000 From: Benjamin Herrenschmidt Reply-To: benh@au1.ibm.com Date: Wed, 07 Sep 2016 07:49:10 +1000 In-Reply-To: <1473198436.8689.38.camel@kernel.crashing.org> 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> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Message-Id: <1473198550.8689.40.camel@au1.ibm.com> Content-Transfer-Encoding: quoted-printable 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: =?ISO-8859-1?Q?C=E9dric?= Le Goater , David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf On Wed, 2016-09-07 at 07:47 +1000, Benjamin Herrenschmidt wrote: > d be an extra op in the xscom device model I guess.=C2=A0 >=20 > 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. >=20 > We need that anyway because of the way XSCOMs can manipulate the HMER > etc... >=20 > >=20 > > Also, the main purpose of the XscomBus is to loop on the devices=C2=A0 > > to populate the device tree. I am wondering if we could just use=C2=A0 > > 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. 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. Cheers, Ben.