Received: from eggs.gnu.org ([2001:4830:134:3::10]:52147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buZYL-0000DQ-9L for qemu-devel@nongnu.org; Thu, 13 Oct 2016 02:31:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buZYH-0002aU-5w for qemu-devel@nongnu.org; Thu, 13 Oct 2016 02:31:40 -0400 Received: from 3.mo1.mail-out.ovh.net ([46.105.60.232]:57700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buZYH-0002Yy-1F for qemu-devel@nongnu.org; Thu, 13 Oct 2016 02:31:37 -0400 Received: from player726.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 0FEA513E43 for ; Thu, 13 Oct 2016 08:31:34 +0200 (CEST) References: <1475479496-16158-1-git-send-email-clg@kaod.org> <1475479496-16158-9-git-send-email-clg@kaod.org> <20161013025255.GL18039@umbus.fritz.box> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: Date: Thu, 13 Oct 2016 08:31:28 +0200 MIME-Version: 1.0 In-Reply-To: <20161013025255.GL18039@umbus.fritz.box> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 08/20] ppc/pnv: add a LPC controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-ppc@nongnu.org, Benjamin Herrenschmidt , qemu-devel@nongnu.org On 10/13/2016 04:52 AM, David Gibson wrote: > On Mon, Oct 03, 2016 at 09:24:44AM +0200, C=E9dric Le Goater wrote: >> From: Benjamin Herrenschmidt >> >> The LPC (Low Pin Count) interface on a POWER8 is made accessible to >> the system through the ADU (XSCOM interface). This interface is part >> of set of units connected together via a local OPB (On-Chip Peripheral >> Bus) which act as a bridge between the ADU and the off chip LPC >> endpoints, like external flash modules. >> >> The most important units of this OPB are : >> - OPB Master: contains the ADU slave logic, a set of internal >> registers and the logic to control the OPB. >> - LPCHC (LPC HOST Controller): which implements a OPB Slave, a set of >> internal registers and the LPC HOST Controller to control the LPC >> interface. >> >> Four address spaces are provided to the ADU : >> - LPC Bus Firmware Memory >> - LPC Bus Memory >> - LPC Bus I/O (ISA bus) >> - and the registers for the OPB Master and the LPC Host Controller >> >> On POWER8, an intermediate hop is necessary to reach the OPB, through >> a unit called the ECCB. OPB commands are simply mangled in ECCB write >> commands. >> >> On POWER9, the OPB master address space can be accessed via MMIO. The >> logic is same but the code will be simpler as the XSCOM and ECCB hops >> are not necessary anymore. >> >> This version of the LPC controller model doesn't yet implement support >> for the SerIRQ deserializer present in the Naples version of the chip >> though some preliminary work is there. >> >> Signed-off-by: Benjamin Herrenschmidt >> [clg: - updated for qemu-2.7 >> - ported on latest PowerNV patchset >> - changed the XSCOM interface to fit new model >> - QOMified the model >> - moved the ISA hunks in another patch >> - removed printf logging >> - added a couple of UNIMP logging >> - rewrote commit log ] >> Signed-off-by: C=E9dric Le Goater >=20 > It looks reasonable as far as it goes. >=20 > I don't see anything wiring this up to qemu's common ISA > infrastructure, which seems a bit odd. Yes. I wanted to distinguish the wiring from the model. It is because there is two different ways to handle the interrupt depending on the chip type and also because we pick chip[0]->lpc to be the primary bus. Thanks, C.=20