All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stuart Yoder <stuart.yoder@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/7] armv8: ls2080a: update stream ID partitioning info
Date: Mon, 22 Feb 2016 09:25:44 -0600	[thread overview]
Message-ID: <1456154749-19629-3-git-send-email-stuart.yoder@nxp.com> (raw)
In-Reply-To: <1456154749-19629-1-git-send-email-stuart.yoder@nxp.com>

From: Stuart Yoder <stuart.yoder@nxp.com>

-update comments around how stream IDs are partitioned

-stream IDs allocated to PCI are no longer divided up by
 controller, but are instead a contiguous range

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
---
 .../asm/arch-fsl-layerscape/ls2080a_stream_id.h    |   55 ++++++++++++--------
 1 file changed, 34 insertions(+), 21 deletions(-)

diff --git a/arch/arm/include/asm/arch-fsl-layerscape/ls2080a_stream_id.h b/arch/arm/include/asm/arch-fsl-layerscape/ls2080a_stream_id.h
index 954104b..ee28323 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/ls2080a_stream_id.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/ls2080a_stream_id.h
@@ -7,28 +7,48 @@
 #ifndef __FSL_STREAM_ID_H
 #define __FSL_STREAM_ID_H
 
-/* Stream IDs on ls2080a devices are not hardwired and are
+/*
+ * Stream IDs on ls2080a devices are not hardwired and are
  * programmed by sw.  There are a limited number of stream IDs
  * available, and the partitioning of them is scenario dependent.
  * This header defines the partitioning between legacy, PCI,
  * and DPAA2 devices.
  *
- * This partitiong can be customized in this file depending
- * on the specific hardware config-- e.g. perhaps not all
- * PEX controllers are in use.
+ * This partitioning can be customized in this file depending
+ * on the specific hardware config:
+ *
+ *  -non-PCI legacy, platform devices (USB, SD/MMC, SATA, DMA)
+ *     -all legacy devices get a unique stream ID assigned and programmed in
+ *      their AMQR registers by u-boot
+ *
+ *  -PCIe
+ *     -there is a range of stream IDs set aside for PCI in this
+ *      file.  U-boot will scan the PCI bus and for each device discovered:
+ *         -allocate a streamID
+ *         -set a PEXn LUT table entry mapping 'requester ID' to 'stream ID'
+ *         -set a msi-map entry in the PEXn controller node in the
+ *          device tree (see Documentation/devicetree/bindings/pci/pci-msi.txt
+ *          for more info on the msi-map definition)
  *
- * On LS2080 stream IDs are programmed in AMQ registers (32-bits) for
+ *  -DPAA2
+ *     -u-boot will allocate a range of stream IDs to be used by the Management
+ *      Complex for containers and will set these values in the MC DPC image.
+ *     -the MC is responsible for allocating and setting up 'isolation context
+ *      IDs (ICIDs) based on the allocated stream IDs for all DPAA2 devices.
+ *
+ * On ls2080a SoCs stream IDs are programmed in AMQ registers (32-bits) for
  * each of the different bus masters.  The relationship between
  * the AMQ registers and stream IDs is defined in the table below:
  *          AMQ bit    streamID bit
  *      ---------------------------
- *           PL[18]         9
- *          BMT[17]         8
- *           VA[16]         7
- *             [15]         -
- *         ICID[14:7]       -
- *         ICID[6:0]        6-0
+ *           PL[18]         9        // privilege bit
+ *          BMT[17]         8        // bypass translation
+ *           VA[16]         7        // reserved
+ *             [15]         -        // unused
+ *         ICID[14:7]       -        // unused
+ *         ICID[6:0]        6-0      // isolation context id
  *     ----------------------------
+ *
  */
 
 #define AMQ_PL_MASK			(0x1 << 18)   /* priviledge bit */
@@ -46,16 +66,9 @@
 #define FSL_SATA2_STREAM_ID		5
 #define FSL_DMA_STREAM_ID		6
 
-/* PCI - programmed in PEXn_LUT by OS */
-/*   4 IDs per controller */
-#define FSL_PEX1_STREAM_ID_START	7
-#define FSL_PEX1_STREAM_ID_END		10
-#define FSL_PEX2_STREAM_ID_START	11
-#define FSL_PEX2_STREAM_ID_END		14
-#define FSL_PEX3_STREAM_ID_START	15
-#define FSL_PEX3_STREAM_ID_END		18
-#define FSL_PEX4_STREAM_ID_START	19
-#define FSL_PEX4_STREAM_ID_END		22
+/* PCI - programmed in PEXn_LUT */
+#define FSL_PEX_STREAM_ID_START		7
+#define FSL_PEX_STREAM_ID_END		22
 
 /* DPAA2 - set in MC DPC and alloced by MC */
 #define FSL_DPAA2_STREAM_ID_START	23
-- 
1.7.9.5

  parent reply	other threads:[~2016-02-22 15:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 15:25 [U-Boot] [PATCH 0/7] support mapping PCI device ids to stream ids for MSIs Stuart Yoder
2016-02-22 15:25 ` [U-Boot] [PATCH 1/7] armv8: ls2080a: remove obsolete stream ID partitioning support Stuart Yoder
2016-02-22 15:25 ` Stuart Yoder [this message]
2016-02-22 15:25 ` [U-Boot] [PATCH 3/7] pci: make pci_get_hose_head() available to external users Stuart Yoder
2016-02-22 15:25 ` [U-Boot] [PATCH 4/7] pci/layerscape: add support for LUT Stuart Yoder
2016-02-22 15:25 ` [U-Boot] [PATCH 5/7] pci/layerscape: add stream ID allocator Stuart Yoder
2016-02-22 15:25 ` [U-Boot] [PATCH 6/7] pci/layerscape: fdt: function to set msi-map entries Stuart Yoder
2016-02-22 15:25 ` [U-Boot] [PATCH 7/7] pci/layerscape: set LUT and msi-map for discovered PCI devices Stuart Yoder
2016-02-23  9:57   ` Minghuan Lian
2016-02-23 15:01     ` Stuart Yoder
2016-02-23 15:19       ` Marc Zyngier
2016-02-23 20:31         ` Stuart Yoder

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=1456154749-19629-3-git-send-email-stuart.yoder@nxp.com \
    --to=stuart.yoder@nxp.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.