Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753975AbbGXHBY (ORCPT ); Fri, 24 Jul 2015 03:01:24 -0400 Received: from foss.arm.com ([217.140.101.70]:43072 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751359AbbGXHBX (ORCPT ); Fri, 24 Jul 2015 03:01:23 -0400 Date: Fri, 24 Jul 2015 08:04:22 +0100 From: Marc Zyngier To: David Daney Cc: Mark Rutland , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-arm-kernel@lists.infradead.org" , Will Deacon , Robin Murphy , Lorenzo Pieralisi , "arnd@arndb.de" , "treding@nvidia.com" , "majun258@huawei.com" , "thunder.leizhen@huawei.com" , "tirumalesh.chalamarla@caviumnetworks.com" , "laurent.pinchart@ideasonboard.com" Subject: Re: [PATCH 1/3] Docs: dt: add generic MSI bindings Message-ID: <20150724080422.48cb64e2@why.wild-wind.fr.eu.org> In-Reply-To: <55B131C3.8050009@caviumnetworks.com> References: <1437670365-20704-1-git-send-email-mark.rutland@arm.com> <1437670365-20704-2-git-send-email-mark.rutland@arm.com> <55B131C3.8050009@caviumnetworks.com> Organization: ARM Ltd X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2908 Lines: 101 On Thu, 23 Jul 2015 19:26:11 +0100 David Daney wrote: > On 07/23/2015 09:52 AM, Mark Rutland wrote: > [...] > > +MSI clients > > +=========== > > + > > +MSI clients are devices which generate MSIs. For each MSI they wish to > > +generate, the doorbell and payload may be configured, though sideband > > +information may not be configurable. > > + > > +Required properties: > > +-------------------- > > + > > +- msi-parent: A list of phandle + msi-specifier pairs, one for each MSI > > + controller which the device is capable of using. > > + > > We say here that "msi-parent" consists of pairs ... > > > + This property is unordered, and MSIs may be allocated from any combination of > > + MSI controllers listed in the msi-parent property. > > + > > + If a device has restrictions on the allocation of MSIs, these restrictions > > + must be described with additional properties. > > + > > + When #msi-cells is non-zero, busses with an msi-parent will require > > + additional properties to describe the relationship between devices on the bus > > + and the set of MSIs they can potentially generate. > > + > > + > > +Example > > +======= > > + > > +/ { > > + #address-cells = <1>; > > + #size-cells = <1>; > > + > > + msi_a: msi-controller@a { > > + reg = <0xa 0xf00>; > > + compatible = "vendor-a,some-controller"; > > + msi-controller; > > + /* No sideband data, so #msi-cells omitted */ > > + }; > > + > > + msi_b: msi-controller@b { > > + reg = <0xb 0xf00>; > > + compatible = "vendor-b,another-controller"; > > + msi-controller; > > + /* Each device has some unique ID */ > > + #msi-cells = <1>; > > + }; > > + > > + msi_c: msi-controller@c { > > + reg = <0xb 0xf00>; > > + compatible = "vendor-b,another-controller"; > > + msi-controller; > > + /* Each device has some unique ID */ > > + #msi-cells = <1>; > > + }; > > + > > + dev@0 { > > + reg = <0x0 0xf00>; > > + compatible = "vendor-c,some-device"; > > + > > + /* Can only generate MSIs to msi_a */ > > + msi-parent = <&msi_a>; > > > My device-tree syntax foo is a little rusty, but doesn't "msi-parent" > need a pair of elements? This has only the phandle. This is a pair in the sense of (phandle, msi-specifier). msi_a doesn't have a #msi-cells, so its msi-specifier is of size 0. In that case, the pair is (phandle, empty-set). You could also have something like: msi_d: msi-controller@d { #msi-cells = <2>; }; dev@f { msi-parent = <&msi_d 0x1 0x2>; }; and msi-parent in this case would still be a pair, with an msi-specifier of size 2. Hope this helps, M. -- Without deviation from the norm, progress is not possible. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/