linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: thommyj@gmail.com (Thommy Jakobsson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] arm-smmu: doc: add SMMU mask documentation
Date: Thu,  9 Jun 2016 12:43:20 +0200	[thread overview]
Message-ID: <1465469001-2352-2-git-send-email-thommyj@gmail.com> (raw)
In-Reply-To: <1465469001-2352-1-git-send-email-thommyj@gmail.com>

Add documentation on how to use a mask for a StreamId.

Signed-off-by: Thommy Jakobsson <thommyj@gmail.com>
---
 .../devicetree/bindings/iommu/arm,smmu.txt         | 23 +++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.txt b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
index 19fe6f2..faf32d8b 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.txt
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
@@ -37,7 +37,15 @@ conditions.
 
 - mmu-masters   : A list of phandles to device nodes representing bus
                   masters for which the SMMU can provide a translation
-                  and their corresponding StreamIDs (see example below).
+                  and their corresponding StreamIDs.
+
+                  Upper halfword of the StreamID-cell is describing an
+                  (optional) mask. If supported by the SMMU, it will use
+                  the following comparison when matching
+                  (incoming StreamID & !mask) == (DT StreamId & !mask)
+                  If no mask is given, a default mask of 0 is used (i.e
+                  entire ID is used for matching). See example below.
+
                   Each device node linked from this list must have a
                   "#stream-id-cells" property, indicating the number of
                   StreamIDs associated with it.
@@ -55,6 +63,12 @@ conditions.
                   SMMU configuration registers. In this case non-secure
                   aliases of secure registers have to be used during
                   SMMU configuration.
+- mmu-masters-mask : An optional list that specifies a mask per StreamID.
+                  A master included in this liss, have to specify masks
+                  for all of its StreamIDs. A master not included in the
+                  list will default to mask 0 (i.e entire ID is used).
+                  This can for example be used in systems where parts of
+                  the StreamID is dynamic.
 
 Example:
 
@@ -70,9 +84,12 @@ Example:
                              <0 37 4>;
 
                 /*
-                 * Two DMA controllers, the first with two StreamIDs (0xd01d
+                 * Three DMA controllers, the first with two StreamIDs (0xd01d
                  * and 0xd01e) and the second with only one (0xd11c).
+                 * The third uses a mask to use all StreamIDs that starts with
+                 * 0xd8
                  */
                 mmu-masters = <&dma0 0xd01d 0xd01e>,
-                              <&dma1 0xd11c>;
+                              <&dma1 0xd11c>,
+                              <&dma2 0x07ffd800>;
         };
-- 
1.9.1

  reply	other threads:[~2016-06-09 10:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 20:40 [PATCH 0/2] arm-smmu: add master mask Thommy Jakobsson
2016-05-30 20:40 ` [PATCH 1/2] arm-smmu: doc: add binding for stream ID mask Thommy Jakobsson
2016-05-30 20:40 ` [PATCH 2/2] arm-smmu: Add possibillity to mask streamIDs Thommy Jakobsson
2016-06-02 13:35   ` Nipun Gupta
2016-06-03  9:02     ` Thommy Jakobsson
2016-06-03  9:41       ` Nipun Gupta
2016-06-03 18:32         ` Thommy Jakobsson
2016-06-03 12:19     ` [PATCH v2 0/2] arm-smmu: add master mask Thommy Jakobsson
2016-06-03 12:19       ` [PATCH v2 1/2] arm-smmu: doc: add binding for stream ID mask Thommy Jakobsson
2016-06-03 12:19       ` [PATCH v2 2/2] arm-smmu: Add possibillity to mask streamIDs Thommy Jakobsson
2016-06-06 12:47   ` [PATCH " Robin Murphy
2016-06-08  7:47     ` Thommy Jakobsson
2016-06-08 11:11       ` Robin Murphy
     [not found]         ` <CALRxmdCVshj_g1tHht9ni3tq5hrKjcv_aZEW0gunA9n3Nt7RXA@mail.gmail.com>
2016-06-08 19:25           ` Stuart Yoder
2016-06-09 10:42         ` Thommy Jakobsson
2016-06-09 10:43         ` [PATCH v3 0/2] " Thommy Jakobsson
2016-06-09 10:43           ` Thommy Jakobsson [this message]
2016-06-14 16:01             ` [PATCH v3 1/2] arm-smmu: doc: add SMMU mask documentation Will Deacon
2016-06-09 10:43           ` [PATCH v3 2/2] arm-smmu: Add possibillity to mask streamIDs Thommy Jakobsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465469001-2352-2-git-send-email-thommyj@gmail.com \
    --to=thommyj@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).