Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932411AbcJZKbv (ORCPT ); Wed, 26 Oct 2016 06:31:51 -0400 Received: from foss.arm.com ([217.140.101.70]:36776 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932318AbcJZKbt (ORCPT ); Wed, 26 Oct 2016 06:31:49 -0400 Date: Wed, 26 Oct 2016 11:31:16 +0100 From: Mark Rutland To: Minghuan Lian Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Marc Zyngier , Stuart Yoder , Yang-Leo Li , Scott Wood , Shawn Guo , Mingkai Hu Subject: Re: [PATCH 1/6] dt/bindings: adjust bindings for Layerscape SCFG MSI Message-ID: <20161026103101.GC19965@leverpostej> References: <1477398945-22774-1-git-send-email-Minghuan.Lian@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1477398945-22774-1-git-send-email-Minghuan.Lian@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3013 Lines: 75 On Tue, Oct 25, 2016 at 08:35:40PM +0800, Minghuan Lian wrote: > 1. The different version of a SoC may have different MSI > implementation. But compatible "fsl,-msi" can not describe > the SoC version. Surely, "fsl,--msi" can describe this? If the hardware differs, it needs a new compatible string. If there's some configuration value that varies across revisions (e.g. number of slots), you can add a proeprty to describe that explciitly. > The MSI driver will use SoC match interface to get > SoC type and version instead of compatible string. So all MSI node > can use the common compatible "fsl,ls-scfg-msi" and the original > compatible is unnecessary. > > 2. Layerscape SoCs may have one or several MSI controllers. > In order to increase MSI interrupt number of a PCIe, the patch > moves all MSI node into the parent node "msi-controller". So a > PCIe can request MSI from all the MSI controllers. This is not necessary, and does not represent a real block of hardware. So NAK for this approach. The msi-parent property can contain a list of MSI controllers. See the examples in Documentation/devicetree/bindings/interrupt-controller/msi.txt. Likewise, the msi-map property can map to a number of MSI controllers. If the core code can only consider one at a time, then that's an issue to be addressed in core code, not one to be bodged around in bindings. > > Signed-off-by: Minghuan Lian > --- > .../interrupt-controller/fsl,ls-scfg-msi.txt | 57 +++++++++++++++++++--- > 1 file changed, 49 insertions(+), 8 deletions(-) > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt b/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt > index 9e38949..29f95fd 100644 > --- a/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt > +++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt > @@ -1,18 +1,28 @@ > * Freescale Layerscape SCFG PCIe MSI controller > > +Layerscape SoCs may have one or multiple MSI controllers. > +Each MSI controller must be showed as a child node. > + > Required properties: > > -- compatible: should be "fsl,-msi" to identify > - Layerscape PCIe MSI controller block such as: > - "fsl,1s1021a-msi" > - "fsl,1s1043a-msi" > +- compatible: should be "fsl,ls-scfg-msi" This breaks old DTBs, and throws away information which you describe above as valuable. So another NAK for that. > +- #address-cells: must be 2 > +- #size-cells: must be 2 > +- ranges: allows valid 1:1 translation between child's address space and > + parent's address space > - msi-controller: indicates that this is a PCIe MSI controller node > + > +Required child node: > +A child node must exist to represent the MSI controller. > +The following are properties specific to those nodes: Also, as above, the approach of gathering MSI controllers in this manner is wrong. Thanks, Mark.