devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index
@ 2015-04-17 22:53 Scott Wood
       [not found] ` <1429311187-19062-1-git-send-email-scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Scott Wood @ 2015-04-17 22:53 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Scott Wood,
	Madalin-Cristian Bucur

It turns out that existing U-Boots will dereference NULL pointers
if the device tree does not have cell-index in the portal nodes.

No patch has yet been merged adding device tree nodes for this binding
(except a dtsi that has not yet been referenced), nor has any driver
yet been merged making use of the binding, so it's not too late to
change the binding in order to keep compatibility with existing
U-Boots.

Signed-off-by: Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: Madalin-Cristian Bucur <madalin.bucur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 Documentation/devicetree/bindings/soc/fsl/qman-portals.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
index 48c4dae..47e46cc 100644
--- a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
@@ -47,7 +47,7 @@ PROPERTIES
 
 	For additional details about the PAMU/LIODN binding(s) see pamu.txt
 
-- fsl,qman-channel-id
+- cell-index
 	Usage:		Required
 	Value type:	<u32>
 	Definition:	The hardware index of the channel. This can also be
@@ -136,7 +136,7 @@ The example below shows a (P4080) QMan portals container/bus node with two porta
 			reg = <0x4000 0x4000>, <0x101000 0x1000>;
 			interrupts = <106 2 0 0>;
 			fsl,liodn = <3 4>;
-			fsl,qman-channel-id = <1>;
+			cell-index = <1>;
 
 			fman0 {
 				fsl,liodn = <0x22>;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] powerpc/mpc85xx: Add FSL QorIQ DPAA QMan support to device tree(s)
       [not found] ` <1429311187-19062-1-git-send-email-scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2015-04-17 22:53   ` Scott Wood
  2015-05-05 16:04   ` [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index Roy Pledge
  1 sibling, 0 replies; 10+ messages in thread
From: Scott Wood @ 2015-04-17 22:53 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Geoff Thorpe,
	Hai-Ying Wang, Chunhe Lan, Poonam Aggrwal, Emil Medve, Scott Wood,
	Madalin-Cristian Bucur

From: Kumar Gala <galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>

Signed-off-by: Kumar Gala <galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
Signed-off-by: Geoff Thorpe <Geoff.Thorpe-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Signed-off-by: Hai-Ying Wang <Haiying.Wang-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Signed-off-by: Chunhe Lan <Chunhe.Lan-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
[Emil Medve: Sync with the upstream binding]
Signed-off-by: Emil Medve <Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
[Scott Wood: s/fsl,qman-channel-id/cell-index]
Signed-off-by: Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: Madalin-Cristian Bucur <madalin.bucur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 arch/powerpc/boot/dts/b4qds.dtsi                   |  12 +
 arch/powerpc/boot/dts/fsl/b4860si-post.dtsi        |  69 +++++
 arch/powerpc/boot/dts/fsl/b4si-post.dtsi           | 106 +++++++
 arch/powerpc/boot/dts/fsl/p1023si-post.dtsi        |  43 +++
 arch/powerpc/boot/dts/fsl/p2041si-post.dtsi        |  13 +
 arch/powerpc/boot/dts/fsl/p3041si-post.dtsi        |  13 +
 arch/powerpc/boot/dts/fsl/p4080si-post.dtsi        |  13 +
 arch/powerpc/boot/dts/fsl/p5020si-post.dtsi        |  13 +
 arch/powerpc/boot/dts/fsl/p5040si-post.dtsi        |  13 +
 arch/powerpc/boot/dts/fsl/qoriq-qman1-portals.dtsi |  20 +-
 arch/powerpc/boot/dts/fsl/t1040si-post.dtsi        |  78 +++++
 arch/powerpc/boot/dts/fsl/t2081si-post.dtsi        | 126 ++++++++
 arch/powerpc/boot/dts/fsl/t4240si-post.dtsi        | 318 +++++++++++++++++++++
 arch/powerpc/boot/dts/kmcoge4.dts                  |  12 +
 arch/powerpc/boot/dts/oca4080.dts                  |  12 +
 arch/powerpc/boot/dts/p1023rdb.dts                 |  12 +
 arch/powerpc/boot/dts/p2041rdb.dts                 |  12 +
 arch/powerpc/boot/dts/p3041ds.dts                  |  12 +
 arch/powerpc/boot/dts/p4080ds.dts                  |  12 +
 arch/powerpc/boot/dts/p5020ds.dts                  |  12 +
 arch/powerpc/boot/dts/p5040ds.dts                  |  12 +
 arch/powerpc/boot/dts/t104xqds.dtsi                |  12 +
 arch/powerpc/boot/dts/t104xrdb.dtsi                |  12 +
 arch/powerpc/boot/dts/t208xqds.dtsi                |  12 +
 arch/powerpc/boot/dts/t208xrdb.dtsi                |  12 +
 arch/powerpc/boot/dts/t4240qds.dts                 |  12 +
 arch/powerpc/boot/dts/t4240rdb.dts                 |  12 +
 27 files changed, 995 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/boot/dts/b4qds.dtsi b/arch/powerpc/boot/dts/b4qds.dtsi
index 24ed80d..559d006 100644
--- a/arch/powerpc/boot/dts/b4qds.dtsi
+++ b/arch/powerpc/boot/dts/b4qds.dtsi
@@ -106,6 +106,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -116,6 +124,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x2000000>;
 	};
 
+	qportals: qman-portals@ff6000000 {
+		ranges = <0x0 0xf 0xf6000000 0x2000000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi
index f35e9e0..5af90fd 100644
--- a/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi
@@ -167,6 +167,75 @@
 	};
 };
 
+&qportals {
+	qportal14: qman-portal@38000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x38000 0x4000>, <0x100e000 0x1000>;
+		interrupts = <132 0x2 0 0>;
+		cell-index = <0xe>;
+	};
+	qportal15: qman-portal@3c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x3c000 0x4000>, <0x100f000 0x1000>;
+		interrupts = <134 0x2 0 0>;
+		cell-index = <0xf>;
+	};
+	qportal16: qman-portal@40000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x40000 0x4000>, <0x1010000 0x1000>;
+		interrupts = <136 0x2 0 0>;
+		cell-index = <0x10>;
+	};
+	qportal17: qman-portal@44000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x44000 0x4000>, <0x1011000 0x1000>;
+		interrupts = <138 0x2 0 0>;
+		cell-index = <0x11>;
+	};
+	qportal18: qman-portal@48000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x48000 0x4000>, <0x1012000 0x1000>;
+		interrupts = <140 0x2 0 0>;
+		cell-index = <0x12>;
+	};
+	qportal19: qman-portal@4c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x4c000 0x4000>, <0x1013000 0x1000>;
+		interrupts = <142 0x2 0 0>;
+		cell-index = <0x13>;
+	};
+	qportal20: qman-portal@50000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x50000 0x4000>, <0x1014000 0x1000>;
+		interrupts = <144 0x2 0 0>;
+		cell-index = <0x14>;
+	};
+	qportal21: qman-portal@54000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x54000 0x4000>, <0x1015000 0x1000>;
+		interrupts = <146 0x2 0 0>;
+		cell-index = <0x15>;
+	};
+	qportal22: qman-portal@58000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x58000 0x4000>, <0x1016000 0x1000>;
+		interrupts = <148 0x2 0 0>;
+		cell-index = <0x16>;
+	};
+	qportal23: qman-portal@5c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x5c000 0x4000>, <0x1017000 0x1000>;
+		interrupts = <150 0x2 0 0>;
+		cell-index = <0x17>;
+	};
+	qportal24: qman-portal@60000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x60000 0x4000>, <0x1018000 0x1000>;
+		interrupts = <152 0x2 0 0>;
+		cell-index = <0x18>;
+	};
+};
+
 &soc {
 	ddr2: memory-controller@9000 {
 		compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
diff --git a/arch/powerpc/boot/dts/fsl/b4si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4si-post.dtsi
index 73136c0..fafb1d9 100644
--- a/arch/powerpc/boot/dts/fsl/b4si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/b4si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10000 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
 &ifc {
 	#address-cells = <2>;
 	#size-cells = <1>;
@@ -210,6 +220,97 @@
 	};
 };
 
+&qportals {
+	#address-cells = <0x1>;
+	#size-cells = <0x1>;
+	compatible = "simple-bus";
+
+	qportal0: qman-portal@0 {
+		compatible = "fsl,qman-portal";
+		reg = <0x0 0x4000>, <0x1000000 0x1000>;
+		interrupts = <104 0x2 0 0>;
+		cell-index = <0x0>;
+	};
+	qportal1: qman-portal@4000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x4000 0x4000>, <0x1001000 0x1000>;
+		interrupts = <106 0x2 0 0>;
+		cell-index = <0x1>;
+	};
+	qportal2: qman-portal@8000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x8000 0x4000>, <0x1002000 0x1000>;
+		interrupts = <108 0x2 0 0>;
+		cell-index = <0x2>;
+	};
+	qportal3: qman-portal@c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xc000 0x4000>, <0x1003000 0x1000>;
+		interrupts = <110 0x2 0 0>;
+		cell-index = <0x3>;
+	};
+	qportal4: qman-portal@10000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x10000 0x4000>, <0x1004000 0x1000>;
+		interrupts = <112 0x2 0 0>;
+		cell-index = <0x4>;
+	};
+	qportal5: qman-portal@14000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x14000 0x4000>, <0x1005000 0x1000>;
+		interrupts = <114 0x2 0 0>;
+		cell-index = <0x5>;
+	};
+	qportal6: qman-portal@18000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x18000 0x4000>, <0x1006000 0x1000>;
+		interrupts = <116 0x2 0 0>;
+		cell-index = <0x6>;
+	};
+	qportal7: qman-portal@1c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x1c000 0x4000>, <0x1007000 0x1000>;
+		interrupts = <118 0x2 0 0>;
+		cell-index = <0x7>;
+	};
+	qportal8: qman-portal@20000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x20000 0x4000>, <0x1008000 0x1000>;
+		interrupts = <120 0x2 0 0>;
+		cell-index = <0x8>;
+	};
+	qportal9: qman-portal@24000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x24000 0x4000>, <0x1009000 0x1000>;
+		interrupts = <122 0x2 0 0>;
+		cell-index = <0x9>;
+	};
+	qportal10: qman-portal@28000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x28000 0x4000>, <0x100a000 0x1000>;
+		interrupts = <124 0x2 0 0>;
+		cell-index = <0xa>;
+	};
+	qportal11: qman-portal@2c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x2c000 0x4000>, <0x100b000 0x1000>;
+		interrupts = <126 0x2 0 0>;
+		cell-index = <0xb>;
+	};
+	qportal12: qman-portal@30000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x30000 0x4000>, <0x100c000 0x1000>;
+		interrupts = <128 0x2 0 0>;
+		cell-index = <0xc>;
+	};
+	qportal13: qman-portal@34000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x34000 0x4000>, <0x100d000 0x1000>;
+		interrupts = <130 0x2 0 0>;
+		cell-index = <0xd>;
+	};
+};
+
 &soc {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -343,6 +444,11 @@
 /include/ "qoriq-duart-1.dtsi"
 /include/ "qoriq-sec5.3-0.dtsi"
 
+/include/ "qoriq-qman3.dtsi"
+	qman: qman@318000 {
+		interrupts = <16 2 1 28>;
+	};
+
 /include/ "qoriq-bman1.dtsi"
 	bman: bman@31a000 {
 		interrupts = <16 2 1 29>;
diff --git a/arch/powerpc/boot/dts/fsl/p1023si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1023si-post.dtsi
index 7780f21..da6d3fc 100644
--- a/arch/powerpc/boot/dts/fsl/p1023si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1023si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10 0>;
+};
+
 &lbc {
 	#address-cells = <2>;
 	#size-cells = <1>;
@@ -102,6 +112,31 @@
 	};
 };
 
+&qportals {
+	#address-cells = <1>;
+	#size-cells = <1>;
+	compatible = "simple-bus";
+
+	qportal0: qman-portal@0 {
+		compatible = "fsl,qman-portal";
+		reg = <0x0 0x4000>, <0x100000 0x1000>;
+		interrupts = <29 2 0 0>;
+		cell-index = <0>;
+	};
+	qportal1: qman-portal@4000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x4000 0x4000>, <0x101000 0x1000>;
+		interrupts = <31 2 0 0>;
+		cell-index = <1>;
+	};
+	qportal2: qman-portal@8000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x8000 0x4000>, <0x102000 0x1000>;
+		interrupts = <33 2 0 0>;
+		cell-index = <2>;
+	};
+};
+
 &bportals {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -248,6 +283,14 @@
 /include/ "pq3-mpic.dtsi"
 /include/ "pq3-mpic-timer-B.dtsi"
 
+	qman: qman@88000 {
+		compatible = "fsl,qman";
+		reg = <0x88000 0x1000>;
+		interrupts = <16 2 0 0>;
+		fsl,qman-portals = <&qportals>;
+		memory-region = <&qman_fqd &qman_pfdr>;
+	};
+
 	bman: bman@8a000 {
 		compatible = "fsl,bman";
 		reg = <0x8a000 0x1000>;
diff --git a/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
index f2feacf..1f18b8b 100644
--- a/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10 0>;
+};
+
 &lbc {
 	compatible = "fsl,p2041-elbc", "fsl,elbc", "simple-bus";
 	interrupts = <25 2 0 0>;
@@ -223,6 +233,8 @@
 
 /include/ "qoriq-bman1-portals.dtsi"
 
+/include/ "qoriq-qman1-portals.dtsi"
+
 &soc {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -415,5 +427,6 @@ crypto: crypto@300000 {
 		fsl,iommu-parent = <&pamu1>;
 	};
 
+/include/ "qoriq-qman1.dtsi"
 /include/ "qoriq-bman1.dtsi"
 };
diff --git a/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi b/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
index d6fea37..a555d24 100644
--- a/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10 0>;
+};
+
 &lbc {
 	compatible = "fsl,p3041-elbc", "fsl,elbc", "simple-bus";
 	interrupts = <25 2 0 0>;
@@ -250,6 +260,8 @@
 
 /include/ "qoriq-bman1-portals.dtsi"
 
+/include/ "qoriq-qman1-portals.dtsi"
+
 &soc {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -442,5 +454,6 @@ crypto: crypto@300000 {
 		fsl,iommu-parent = <&pamu1>;
 	};
 
+/include/ "qoriq-qman1.dtsi"
 /include/ "qoriq-bman1.dtsi"
 };
diff --git a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
index 89482c9..0fe7281 100644
--- a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10 0>;
+};
+
 &lbc {
 	compatible = "fsl,p4080-elbc", "fsl,elbc", "simple-bus";
 	interrupts = <25 2 0 0>;
@@ -250,6 +260,8 @@
 
 /include/ "qoriq-bman1-portals.dtsi"
 
+/include/ "qoriq-qman1-portals.dtsi"
+
 &soc {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -498,5 +510,6 @@ crypto: crypto@300000 {
 		fsl,iommu-parent = <&pamu1>;
 	};
 
+/include/ "qoriq-qman1.dtsi"
 /include/ "qoriq-bman1.dtsi"
 };
diff --git a/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
index 6e04851..a34ca20 100644
--- a/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10000 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
 &lbc {
 	compatible = "fsl,p5020-elbc", "fsl,elbc", "simple-bus";
 	interrupts = <25 2 0 0>;
@@ -247,6 +257,8 @@
 
 /include/ "qoriq-bman1-portals.dtsi"
 
+/include/ "qoriq-qman1-portals.dtsi"
+
 &soc {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -428,6 +440,7 @@
 		fsl,iommu-parent = <&pamu1>;
 	};
 
+/include/ "qoriq-qman1.dtsi"
 /include/ "qoriq-bman1.dtsi"
 
 /include/ "qoriq-raid1.0-0.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi b/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
index 5e44dfa..bf57513 100644
--- a/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10000 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
 &lbc {
 	compatible = "fsl,p5040-elbc", "fsl,elbc", "simple-bus";
 	interrupts = <25 2 0 0>;
@@ -202,6 +212,8 @@
 
 /include/ "qoriq-bman1-portals.dtsi"
 
+/include/ "qoriq-qman1-portals.dtsi"
+
 &soc {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -407,5 +419,6 @@
 		fsl,iommu-parent = <&pamu4>;
 	};
 
+/include/ "qoriq-qman1.dtsi"
 /include/ "qoriq-bman1.dtsi"
 };
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-qman1-portals.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-qman1-portals.dtsi
index 05d51ac..e77e4b4 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-qman1-portals.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-qman1-portals.dtsi
@@ -41,61 +41,61 @@
 		compatible = "fsl,qman-portal";
 		reg = <0x0 0x4000>, <0x100000 0x1000>;
 		interrupts = <104 2 0 0>;
-		fsl,qman-channel-id = <0x0>;
+		cell-index = <0x0>;
 	};
 	qportal1: qman-portal@4000 {
 		compatible = "fsl,qman-portal";
 		reg = <0x4000 0x4000>, <0x101000 0x1000>;
 		interrupts = <106 2 0 0>;
-		fsl,qman-channel-id = <1>;
+		cell-index = <1>;
 	};
 	qportal2: qman-portal@8000 {
 		compatible = "fsl,qman-portal";
 		reg = <0x8000 0x4000>, <0x102000 0x1000>;
 		interrupts = <108 2 0 0>;
-		fsl,qman-channel-id = <2>;
+		cell-index = <2>;
 	};
 	qportal3: qman-portal@c000 {
 		compatible = "fsl,qman-portal";
 		reg = <0xc000 0x4000>, <0x103000 0x1000>;
 		interrupts = <110 2 0 0>;
-		fsl,qman-channel-id = <3>;
+		cell-index = <3>;
 	};
 	qportal4: qman-portal@10000 {
 		compatible = "fsl,qman-portal";
 		reg = <0x10000 0x4000>, <0x104000 0x1000>;
 		interrupts = <112 2 0 0>;
-		fsl,qman-channel-id = <4>;
+		cell-index = <4>;
 	};
 	qportal5: qman-portal@14000 {
 		compatible = "fsl,qman-portal";
 		reg = <0x14000 0x4000>, <0x105000 0x1000>;
 		interrupts = <114 2 0 0>;
-		fsl,qman-channel-id = <5>;
+		cell-index = <5>;
 	};
 	qportal6: qman-portal@18000 {
 		compatible = "fsl,qman-portal";
 		reg = <0x18000 0x4000>, <0x106000 0x1000>;
 		interrupts = <116 2 0 0>;
-		fsl,qman-channel-id = <6>;
+		cell-index = <6>;
 	};
 
 	qportal7: qman-portal@1c000 {
 		compatible = "fsl,qman-portal";
 		reg = <0x1c000 0x4000>, <0x107000 0x1000>;
 		interrupts = <118 2 0 0>;
-		fsl,qman-channel-id = <7>;
+		cell-index = <7>;
 	};
 	qportal8: qman-portal@20000 {
 		compatible = "fsl,qman-portal";
 		reg = <0x20000 0x4000>, <0x108000 0x1000>;
 		interrupts = <120 2 0 0>;
-		fsl,qman-channel-id = <8>;
+		cell-index = <8>;
 	};
 	qportal9: qman-portal@24000 {
 		compatible = "fsl,qman-portal";
 		reg = <0x24000 0x4000>, <0x109000 0x1000>;
 		interrupts = <122 2 0 0>;
-		fsl,qman-channel-id = <9>;
+		cell-index = <9>;
 	};
 };
diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
index 5cc01be..9e9f7e2 100644
--- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10000 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
 &ifc {
 	#address-cells = <2>;
 	#size-cells = <1>;
@@ -280,6 +290,73 @@
 	};
 };
 
+&qportals {
+	#address-cells = <0x1>;
+	#size-cells = <0x1>;
+	compatible = "simple-bus";
+
+	qportal0: qman-portal@0 {
+		compatible = "fsl,qman-portal";
+		reg = <0x0 0x4000>, <0x1000000 0x1000>;
+		interrupts = <104 0x2 0 0>;
+		cell-index = <0x0>;
+	};
+	qportal1: qman-portal@4000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x4000 0x4000>, <0x1001000 0x1000>;
+		interrupts = <106 0x2 0 0>;
+		cell-index = <0x1>;
+	};
+	qportal2: qman-portal@8000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x8000 0x4000>, <0x1002000 0x1000>;
+		interrupts = <108 0x2 0 0>;
+		cell-index = <0x2>;
+	};
+	qportal3: qman-portal@c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xc000 0x4000>, <0x1003000 0x1000>;
+		interrupts = <110 0x2 0 0>;
+		cell-index = <0x3>;
+	};
+	qportal4: qman-portal@10000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x10000 0x4000>, <0x1004000 0x1000>;
+		interrupts = <112 0x2 0 0>;
+		cell-index = <0x4>;
+	};
+	qportal5: qman-portal@14000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x14000 0x4000>, <0x1005000 0x1000>;
+		interrupts = <114 0x2 0 0>;
+		cell-index = <0x5>;
+	};
+	qportal6: qman-portal@18000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x18000 0x4000>, <0x1006000 0x1000>;
+		interrupts = <116 0x2 0 0>;
+		cell-index = <0x6>;
+	};
+	qportal7: qman-portal@1c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x1c000 0x4000>, <0x1007000 0x1000>;
+		interrupts = <118 0x2 0 0>;
+		cell-index = <0x7>;
+	};
+	qportal8: qman-portal@20000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x20000 0x4000>, <0x1008000 0x1000>;
+		interrupts = <120 0x2 0 0>;
+		cell-index = <0x8>;
+	};
+	qportal9: qman-portal@24000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x24000 0x4000>, <0x1009000 0x1000>;
+		interrupts = <122 0x2 0 0>;
+		cell-index = <0x9>;
+	};
+};
+
 &soc {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -463,5 +540,6 @@
 		fsl,liodn-reg = <&guts 0x554>; /* SATA2LIODNR */
 	};
 /include/ "qoriq-sec5.0-0.dtsi"
+/include/ "qoriq-qman3.dtsi"
 /include/ "qoriq-bman1.dtsi"
 };
diff --git a/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi b/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi
index 86bdaf6..8ebf738 100644
--- a/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10000 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
 &ifc {
 	#address-cells = <2>;
 	#size-cells = <1>;
@@ -326,6 +336,121 @@
 	};
 };
 
+&qportals {
+	#address-cells = <0x1>;
+	#size-cells = <0x1>;
+	compatible = "simple-bus";
+
+	qportal0: qman-portal@0 {
+		compatible = "fsl,qman-portal";
+		reg = <0x0 0x4000>, <0x1000000 0x1000>;
+		interrupts = <104 0x2 0 0>;
+		cell-index = <0x0>;
+	};
+	qportal1: qman-portal@4000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x4000 0x4000>, <0x1001000 0x1000>;
+		interrupts = <106 0x2 0 0>;
+		cell-index = <0x1>;
+	};
+	qportal2: qman-portal@8000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x8000 0x4000>, <0x1002000 0x1000>;
+		interrupts = <108 0x2 0 0>;
+		cell-index = <0x2>;
+	};
+	qportal3: qman-portal@c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xc000 0x4000>, <0x1003000 0x1000>;
+		interrupts = <110 0x2 0 0>;
+		cell-index = <0x3>;
+	};
+	qportal4: qman-portal@10000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x10000 0x4000>, <0x1004000 0x1000>;
+		interrupts = <112 0x2 0 0>;
+		cell-index = <0x4>;
+	};
+	qportal5: qman-portal@14000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x14000 0x4000>, <0x1005000 0x1000>;
+		interrupts = <114 0x2 0 0>;
+		cell-index = <0x5>;
+	};
+	qportal6: qman-portal@18000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x18000 0x4000>, <0x1006000 0x1000>;
+		interrupts = <116 0x2 0 0>;
+		cell-index = <0x6>;
+	};
+	qportal7: qman-portal@1c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x1c000 0x4000>, <0x1007000 0x1000>;
+		interrupts = <118 0x2 0 0>;
+		cell-index = <0x7>;
+	};
+	qportal8: qman-portal@20000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x20000 0x4000>, <0x1008000 0x1000>;
+		interrupts = <120 0x2 0 0>;
+		cell-index = <0x8>;
+	};
+	qportal9: qman-portal@24000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x24000 0x4000>, <0x1009000 0x1000>;
+		interrupts = <122 0x2 0 0>;
+		cell-index = <0x9>;
+	};
+	qportal10: qman-portal@28000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x28000 0x4000>, <0x100a000 0x1000>;
+		interrupts = <124 0x2 0 0>;
+		cell-index = <0xa>;
+	};
+	qportal11: qman-portal@2c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x2c000 0x4000>, <0x100b000 0x1000>;
+		interrupts = <126 0x2 0 0>;
+		cell-index = <0xb>;
+	};
+	qportal12: qman-portal@30000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x30000 0x4000>, <0x100c000 0x1000>;
+		interrupts = <128 0x2 0 0>;
+		cell-index = <0xc>;
+	};
+	qportal13: qman-portal@34000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x34000 0x4000>, <0x100d000 0x1000>;
+		interrupts = <130 0x2 0 0>;
+		cell-index = <0xd>;
+	};
+	qportal14: qman-portal@38000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x38000 0x4000>, <0x100e000 0x1000>;
+		interrupts = <132 0x2 0 0>;
+		cell-index = <0xe>;
+	};
+	qportal15: qman-portal@3c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x3c000 0x4000>, <0x100f000 0x1000>;
+		interrupts = <134 0x2 0 0>;
+		cell-index = <0xf>;
+	};
+	qportal16: qman-portal@40000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x40000 0x4000>, <0x1010000 0x1000>;
+		interrupts = <136 0x2 0 0>;
+		cell-index = <0x10>;
+	};
+	qportal17: qman-portal@44000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x44000 0x4000>, <0x1011000 0x1000>;
+		interrupts = <138 0x2 0 0>;
+		cell-index = <0x11>;
+	};
+};
+
 &soc {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -502,6 +627,7 @@
 		phy_type = "utmi";
 	};
 /include/ "qoriq-sec5.2-0.dtsi"
+/include/ "qoriq-qman3.dtsi"
 /include/ "qoriq-bman1.dtsi"
 
 	L2_1: l2-cache-controller@c20000 {
diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
index 4d4f258..d806360 100644
--- a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
@@ -37,6 +37,16 @@
 	alloc-ranges = <0 0 0x10000 0>;
 };
 
+&qman_fqd {
+	compatible = "fsl,qman-fqd";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
+&qman_pfdr {
+	compatible = "fsl,qman-pfdr";
+	alloc-ranges = <0 0 0x10000 0>;
+};
+
 &ifc {
 	#address-cells = <2>;
 	#size-cells = <1>;
@@ -556,6 +566,313 @@
 	};
 };
 
+&qportals {
+	#address-cells = <0x1>;
+	#size-cells = <0x1>;
+	compatible = "simple-bus";
+
+	qportal0: qman-portal@0 {
+		compatible = "fsl,qman-portal";
+		reg = <0x0 0x4000>, <0x1000000 0x1000>;
+		interrupts = <104 0x2 0 0>;
+		cell-index = <0x0>;
+	};
+	qportal1: qman-portal@4000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x4000 0x4000>, <0x1001000 0x1000>;
+		interrupts = <106 0x2 0 0>;
+		cell-index = <0x1>;
+	};
+	qportal2: qman-portal@8000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x8000 0x4000>, <0x1002000 0x1000>;
+		interrupts = <108 0x2 0 0>;
+		cell-index = <0x2>;
+	};
+	qportal3: qman-portal@c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xc000 0x4000>, <0x1003000 0x1000>;
+		interrupts = <110 0x2 0 0>;
+		cell-index = <0x3>;
+	};
+	qportal4: qman-portal@10000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x10000 0x4000>, <0x1004000 0x1000>;
+		interrupts = <112 0x2 0 0>;
+		cell-index = <0x4>;
+	};
+	qportal5: qman-portal@14000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x14000 0x4000>, <0x1005000 0x1000>;
+		interrupts = <114 0x2 0 0>;
+		cell-index = <0x5>;
+	};
+	qportal6: qman-portal@18000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x18000 0x4000>, <0x1006000 0x1000>;
+		interrupts = <116 0x2 0 0>;
+		cell-index = <0x6>;
+	};
+	qportal7: qman-portal@1c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x1c000 0x4000>, <0x1007000 0x1000>;
+		interrupts = <118 0x2 0 0>;
+		cell-index = <0x7>;
+	};
+	qportal8: qman-portal@20000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x20000 0x4000>, <0x1008000 0x1000>;
+		interrupts = <120 0x2 0 0>;
+		cell-index = <0x8>;
+	};
+	qportal9: qman-portal@24000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x24000 0x4000>, <0x1009000 0x1000>;
+		interrupts = <122 0x2 0 0>;
+		cell-index = <0x9>;
+	};
+	qportal10: qman-portal@28000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x28000 0x4000>, <0x100a000 0x1000>;
+		interrupts = <124 0x2 0 0>;
+		cell-index = <0xa>;
+	};
+	qportal11: qman-portal@2c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x2c000 0x4000>, <0x100b000 0x1000>;
+		interrupts = <126 0x2 0 0>;
+		cell-index = <0xb>;
+	};
+	qportal12: qman-portal@30000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x30000 0x4000>, <0x100c000 0x1000>;
+		interrupts = <128 0x2 0 0>;
+		cell-index = <0xc>;
+	};
+	qportal13: qman-portal@34000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x34000 0x4000>, <0x100d000 0x1000>;
+		interrupts = <130 0x2 0 0>;
+		cell-index = <0xd>;
+	};
+	qportal14: qman-portal@38000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x38000 0x4000>, <0x100e000 0x1000>;
+		interrupts = <132 0x2 0 0>;
+		cell-index = <0xe>;
+	};
+	qportal15: qman-portal@3c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x3c000 0x4000>, <0x100f000 0x1000>;
+		interrupts = <134 0x2 0 0>;
+		cell-index = <0xf>;
+	};
+	qportal16: qman-portal@40000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x40000 0x4000>, <0x1010000 0x1000>;
+		interrupts = <136 0x2 0 0>;
+		cell-index = <0x10>;
+	};
+	qportal17: qman-portal@44000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x44000 0x4000>, <0x1011000 0x1000>;
+		interrupts = <138 0x2 0 0>;
+		cell-index = <0x11>;
+	};
+	qportal18: qman-portal@48000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x48000 0x4000>, <0x1012000 0x1000>;
+		interrupts = <140 0x2 0 0>;
+		cell-index = <0x12>;
+	};
+	qportal19: qman-portal@4c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x4c000 0x4000>, <0x1013000 0x1000>;
+		interrupts = <142 0x2 0 0>;
+		cell-index = <0x13>;
+	};
+	qportal20: qman-portal@50000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x50000 0x4000>, <0x1014000 0x1000>;
+		interrupts = <144 0x2 0 0>;
+		cell-index = <0x14>;
+	};
+	qportal21: qman-portal@54000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x54000 0x4000>, <0x1015000 0x1000>;
+		interrupts = <146 0x2 0 0>;
+		cell-index = <0x15>;
+	};
+	qportal22: qman-portal@58000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x58000 0x4000>, <0x1016000 0x1000>;
+		interrupts = <148 0x2 0 0>;
+		cell-index = <0x16>;
+	};
+	qportal23: qman-portal@5c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x5c000 0x4000>, <0x1017000 0x1000>;
+		interrupts = <150 0x2 0 0>;
+		cell-index = <0x17>;
+	};
+	qportal24: qman-portal@60000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x60000 0x4000>, <0x1018000 0x1000>;
+		interrupts = <152 0x2 0 0>;
+		cell-index = <0x18>;
+	};
+	qportal25: qman-portal@64000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x64000 0x4000>, <0x1019000 0x1000>;
+		interrupts = <154 0x2 0 0>;
+		cell-index = <0x19>;
+	};
+	qportal26: qman-portal@68000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x68000 0x4000>, <0x101a000 0x1000>;
+		interrupts = <156 0x2 0 0>;
+		cell-index = <0x1a>;
+	};
+	qportal27: qman-portal@6c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x6c000 0x4000>, <0x101b000 0x1000>;
+		interrupts = <158 0x2 0 0>;
+		cell-index = <0x1b>;
+	};
+	qportal28: qman-portal@70000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x70000 0x4000>, <0x101c000 0x1000>;
+		interrupts = <160 0x2 0 0>;
+		cell-index = <0x1c>;
+	};
+	qportal29: qman-portal@74000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x74000 0x4000>, <0x101d000 0x1000>;
+		interrupts = <162 0x2 0 0>;
+		cell-index = <0x1d>;
+	};
+	qportal30: qman-portal@78000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x78000 0x4000>, <0x101e000 0x1000>;
+		interrupts = <164 0x2 0 0>;
+		cell-index = <0x1e>;
+	};
+	qportal31: qman-portal@7c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x7c000 0x4000>, <0x101f000 0x1000>;
+		interrupts = <166 0x2 0 0>;
+		cell-index = <0x1f>;
+	};
+	qportal32: qman-portal@80000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x80000 0x4000>, <0x1020000 0x1000>;
+		interrupts = <168 0x2 0 0>;
+		cell-index = <0x20>;
+	};
+	qportal33: qman-portal@84000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x84000 0x4000>, <0x1021000 0x1000>;
+		interrupts = <170 0x2 0 0>;
+		cell-index = <0x21>;
+	};
+	qportal34: qman-portal@88000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x88000 0x4000>, <0x1022000 0x1000>;
+		interrupts = <172 0x2 0 0>;
+		cell-index = <0x22>;
+	};
+	qportal35: qman-portal@8c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x8c000 0x4000>, <0x1023000 0x1000>;
+		interrupts = <174 0x2 0 0>;
+		cell-index = <0x23>;
+	};
+	qportal36: qman-portal@90000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x90000 0x4000>, <0x1024000 0x1000>;
+		interrupts = <384 0x2 0 0>;
+		cell-index = <0x24>;
+	};
+	qportal37: qman-portal@94000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x94000 0x4000>, <0x1025000 0x1000>;
+		interrupts = <386 0x2 0 0>;
+		cell-index = <0x25>;
+	};
+	qportal38: qman-portal@98000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x98000 0x4000>, <0x1026000 0x1000>;
+		interrupts = <388 0x2 0 0>;
+		cell-index = <0x26>;
+	};
+	qportal39: qman-portal@9c000 {
+		compatible = "fsl,qman-portal";
+		reg = <0x9c000 0x4000>, <0x1027000 0x1000>;
+		interrupts = <390 0x2 0 0>;
+		cell-index = <0x27>;
+	};
+	qportal40: qman-portal@a0000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xa0000 0x4000>, <0x1028000 0x1000>;
+		interrupts = <392 0x2 0 0>;
+		cell-index = <0x28>;
+	};
+	qportal41: qman-portal@a4000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xa4000 0x4000>, <0x1029000 0x1000>;
+		interrupts = <394 0x2 0 0>;
+		cell-index = <0x29>;
+	};
+	qportal42: qman-portal@a8000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xa8000 0x4000>, <0x102a000 0x1000>;
+		interrupts = <396 0x2 0 0>;
+		cell-index = <0x2a>;
+	};
+	qportal43: qman-portal@ac000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xac000 0x4000>, <0x102b000 0x1000>;
+		interrupts = <398 0x2 0 0>;
+		cell-index = <0x2b>;
+	};
+	qportal44: qman-portal@b0000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xb0000 0x4000>, <0x102c000 0x1000>;
+		interrupts = <400 0x2 0 0>;
+		cell-index = <0x2c>;
+	};
+	qportal45: qman-portal@b4000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xb4000 0x4000>, <0x102d000 0x1000>;
+		interrupts = <402 0x2 0 0>;
+		cell-index = <0x2d>;
+	};
+	qportal46: qman-portal@b8000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xb8000 0x4000>, <0x102e000 0x1000>;
+		interrupts = <404 0x2 0 0>;
+		cell-index = <0x2e>;
+	};
+	qportal47: qman-portal@bc000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xbc000 0x4000>, <0x102f000 0x1000>;
+		interrupts = <406 0x2 0 0>;
+		cell-index = <0x2f>;
+	};
+	qportal48: qman-portal@c0000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xc0000 0x4000>, <0x1030000 0x1000>;
+		interrupts = <408 0x2 0 0>;
+		cell-index = <0x30>;
+	};
+	qportal49: qman-portal@c4000 {
+		compatible = "fsl,qman-portal";
+		reg = <0xc4000 0x4000>, <0x1031000 0x1000>;
+		interrupts = <410 0x2 0 0>;
+		cell-index = <0x31>;
+	};
+};
+
 &soc {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -748,6 +1065,7 @@
 /include/ "qoriq-sata2-0.dtsi"
 /include/ "qoriq-sata2-1.dtsi"
 /include/ "qoriq-sec5.0-0.dtsi"
+/include/ "qoriq-qman3.dtsi"
 /include/ "qoriq-bman1.dtsi"
 
 	L2_1: l2-cache-controller@c20000 {
diff --git a/arch/powerpc/boot/dts/kmcoge4.dts b/arch/powerpc/boot/dts/kmcoge4.dts
index 97e6d11..48dab6a 100644
--- a/arch/powerpc/boot/dts/kmcoge4.dts
+++ b/arch/powerpc/boot/dts/kmcoge4.dts
@@ -34,6 +34,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -44,6 +52,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x200000>;
 	};
 
+	qportals: qman-portals@ff4200000 {
+		ranges = <0x0 0xf 0xf4200000 0x200000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/oca4080.dts b/arch/powerpc/boot/dts/oca4080.dts
index eb76caa..42796c5 100644
--- a/arch/powerpc/boot/dts/oca4080.dts
+++ b/arch/powerpc/boot/dts/oca4080.dts
@@ -58,6 +58,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -68,6 +76,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x200000>;
 	};
 
+	qportals: qman-portals@ff4200000 {
+		ranges = <0x0 0xf 0xf4200000 0x200000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/p1023rdb.dts b/arch/powerpc/boot/dts/p1023rdb.dts
index 9236e37..05a00a4 100644
--- a/arch/powerpc/boot/dts/p1023rdb.dts
+++ b/arch/powerpc/boot/dts/p1023rdb.dts
@@ -56,6 +56,18 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
+	};
+
+	qportals: qman-portals@ff000000 {
+		ranges = <0x0 0xf 0xff000000 0x200000>;
 	};
 
 	bportals: bman-portals@ff200000 {
diff --git a/arch/powerpc/boot/dts/p2041rdb.dts b/arch/powerpc/boot/dts/p2041rdb.dts
index c1e69dc..d2bb0765 100644
--- a/arch/powerpc/boot/dts/p2041rdb.dts
+++ b/arch/powerpc/boot/dts/p2041rdb.dts
@@ -54,6 +54,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -64,6 +72,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x200000>;
 	};
 
+	qportals: qman-portals@ff4200000 {
+		ranges = <0x0 0xf 0xf4200000 0x200000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/p3041ds.dts b/arch/powerpc/boot/dts/p3041ds.dts
index 2192fe9..eca6c69 100644
--- a/arch/powerpc/boot/dts/p3041ds.dts
+++ b/arch/powerpc/boot/dts/p3041ds.dts
@@ -54,6 +54,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -64,6 +72,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x200000>;
 	};
 
+	qportals: qman-portals@ff4200000 {
+		ranges = <0x0 0xf 0xf4200000 0x200000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/p4080ds.dts b/arch/powerpc/boot/dts/p4080ds.dts
index fad4416..4f80c9d 100644
--- a/arch/powerpc/boot/dts/p4080ds.dts
+++ b/arch/powerpc/boot/dts/p4080ds.dts
@@ -54,6 +54,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -64,6 +72,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x200000>;
 	};
 
+	qportals: qman-portals@ff4200000 {
+		ranges = <0x0 0xf 0xf4200000 0x200000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/p5020ds.dts b/arch/powerpc/boot/dts/p5020ds.dts
index 7382636..d0309a8 100644
--- a/arch/powerpc/boot/dts/p5020ds.dts
+++ b/arch/powerpc/boot/dts/p5020ds.dts
@@ -54,6 +54,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -64,6 +72,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x200000>;
 	};
 
+	qportals: qman-portals@ff4200000 {
+		ranges = <0x0 0xf 0xf4200000 0x200000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/p5040ds.dts b/arch/powerpc/boot/dts/p5040ds.dts
index 35dabf5..0516823 100644
--- a/arch/powerpc/boot/dts/p5040ds.dts
+++ b/arch/powerpc/boot/dts/p5040ds.dts
@@ -54,6 +54,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -64,6 +72,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x200000>;
 	};
 
+	qportals: qman-portals@ff4200000 {
+		ranges = <0x0 0xf 0xf4200000 0x200000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/t104xqds.dtsi b/arch/powerpc/boot/dts/t104xqds.dtsi
index f7e9bfb..1498d1e 100644
--- a/arch/powerpc/boot/dts/t104xqds.dtsi
+++ b/arch/powerpc/boot/dts/t104xqds.dtsi
@@ -47,6 +47,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	ifc: localbus@ffe124000 {
@@ -92,6 +100,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x2000000>;
 	};
 
+	qportals: qman-portals@ff6000000 {
+		ranges = <0x0 0xf 0xf6000000 0x2000000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/t104xrdb.dtsi b/arch/powerpc/boot/dts/t104xrdb.dtsi
index 76e07a3..830ea48 100644
--- a/arch/powerpc/boot/dts/t104xrdb.dtsi
+++ b/arch/powerpc/boot/dts/t104xrdb.dtsi
@@ -42,6 +42,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	ifc: localbus@ffe124000 {
@@ -83,6 +91,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x2000000>;
 	};
 
+	qportals: qman-portals@ff6000000 {
+		ranges = <0x0 0xf 0xf6000000 0x2000000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/t208xqds.dtsi b/arch/powerpc/boot/dts/t208xqds.dtsi
index c42e07f..869f915 100644
--- a/arch/powerpc/boot/dts/t208xqds.dtsi
+++ b/arch/powerpc/boot/dts/t208xqds.dtsi
@@ -48,6 +48,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	ifc: localbus@ffe124000 {
@@ -93,6 +101,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x2000000>;
 	};
 
+	qportals: qman-portals@ff6000000 {
+		ranges = <0x0 0xf 0xf6000000 0x2000000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/t208xrdb.dtsi b/arch/powerpc/boot/dts/t208xrdb.dtsi
index e1463b1..693d2a8 100644
--- a/arch/powerpc/boot/dts/t208xrdb.dtsi
+++ b/arch/powerpc/boot/dts/t208xrdb.dtsi
@@ -48,6 +48,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	ifc: localbus@ffe124000 {
@@ -94,6 +102,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x2000000>;
 	};
 
+	qportals: qman-portals@ff6000000 {
+		ranges = <0x0 0xf 0xf6000000 0x2000000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/t4240qds.dts b/arch/powerpc/boot/dts/t4240qds.dts
index 6df7776..93722da 100644
--- a/arch/powerpc/boot/dts/t4240qds.dts
+++ b/arch/powerpc/boot/dts/t4240qds.dts
@@ -109,6 +109,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -119,6 +127,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x2000000>;
 	};
 
+	qportals: qman-portals@ff6000000 {
+		ranges = <0x0 0xf 0xf6000000 0x2000000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
diff --git a/arch/powerpc/boot/dts/t4240rdb.dts b/arch/powerpc/boot/dts/t4240rdb.dts
index 46049cf..993eb4b 100644
--- a/arch/powerpc/boot/dts/t4240rdb.dts
+++ b/arch/powerpc/boot/dts/t4240rdb.dts
@@ -78,6 +78,14 @@
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
 		};
+		qman_fqd: qman-fqd {
+			size = <0 0x400000>;
+			alignment = <0 0x400000>;
+		};
+		qman_pfdr: qman-pfdr {
+			size = <0 0x2000000>;
+			alignment = <0 0x2000000>;
+		};
 	};
 
 	dcsr: dcsr@f00000000 {
@@ -88,6 +96,10 @@
 		ranges = <0x0 0xf 0xf4000000 0x2000000>;
 	};
 
+	qportals: qman-portals@ff6000000 {
+		ranges = <0x0 0xf 0xf6000000 0x2000000>;
+	};
+
 	soc: soc@ffe000000 {
 		ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
 		reg = <0xf 0xfe000000 0 0x00001000>;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* RE: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index
       [not found] ` <1429311187-19062-1-git-send-email-scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  2015-04-17 22:53   ` [PATCH 2/2] powerpc/mpc85xx: Add FSL QorIQ DPAA QMan support to device tree(s) Scott Wood
@ 2015-05-05 16:04   ` Roy Pledge
       [not found]     ` <BN3PR0301MB126796C0EC18EEBB26702C588CD10-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: Roy Pledge @ 2015-05-05 16:04 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
  Cc: Scott Wood, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Madalin-Cristian Bucur

Sorry for the slow reply.

I don't believe this is correct - let me explain the rational why we had two properties in the QMan portal to begin with.

The two properties in question are cell-index and fsl,qman-channel-id.

The cell-index property is used in u-boot as an index for the software portal ID when adding the fsl,liodn from the U-boot table into the device tree.

The  fsl,qman-channel-id property is used in Linux and corresponds to a hardware value that indicates which channel is dedicated to the software portal.

While I'm not aware of a current SoC where the channel ID for a software portal does not match the index (i.e. SWP 0 uses channel 0, etc.) it is possible that future SoCs could stray from this model, there is no reason for portal index to equal channel ID at all times.

Roy


-----Original Message-----
From: Linuxppc-dev [mailto:linuxppc-dev-bounces+roy.pledge=freescale.com@lists.ozlabs.org] On Behalf Of Scott Wood
Sent: Friday, April 17, 2015 6:53 PM
To: linuxppc-dev@lists.ozlabs.org
Cc: Wood Scott-B07421; devicetree@vger.kernel.org; Bucur Madalin-Cristian-B32716
Subject: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index

It turns out that existing U-Boots will dereference NULL pointers if the device tree does not have cell-index in the portal nodes.

No patch has yet been merged adding device tree nodes for this binding (except a dtsi that has not yet been referenced), nor has any driver yet been merged making use of the binding, so it's not too late to change the binding in order to keep compatibility with existing U-Boots.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
---
 Documentation/devicetree/bindings/soc/fsl/qman-portals.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
index 48c4dae..47e46cc 100644
--- a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
@@ -47,7 +47,7 @@ PROPERTIES
 
 	For additional details about the PAMU/LIODN binding(s) see pamu.txt
 
-- fsl,qman-channel-id
+- cell-index
 	Usage:		Required
 	Value type:	<u32>
 	Definition:	The hardware index of the channel. This can also be
@@ -136,7 +136,7 @@ The example below shows a (P4080) QMan portals container/bus node with two porta
 			reg = <0x4000 0x4000>, <0x101000 0x1000>;
 			interrupts = <106 2 0 0>;
 			fsl,liodn = <3 4>;
-			fsl,qman-channel-id = <1>;
+			cell-index = <1>;
 
 			fman0 {
 				fsl,liodn = <0x22>;
--
2.1.0

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index
       [not found]     ` <BN3PR0301MB126796C0EC18EEBB26702C588CD10-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2015-05-05 20:45       ` Scott Wood
  2015-05-12 21:19         ` Roy Pledge
  0 siblings, 1 reply; 10+ messages in thread
From: Scott Wood @ 2015-05-05 20:45 UTC (permalink / raw)
  To: Pledge Roy-R01356
  Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Bucur Madalin-Cristian-B32716

On Tue, 2015-05-05 at 11:04 -0500, Pledge Roy-R01356 wrote:
> Sorry for the slow reply.
> 
> I don't believe this is correct - let me explain the rational why we had two properties in the QMan portal to begin with.
> 
> The two properties in question are cell-index and fsl,qman-channel-id.
> 
> The cell-index property is used in u-boot as an index for the software portal ID when adding the fsl,liodn from the U-boot table into the device tree.

The device tree is not supposed to contain arbitrary software
identifiers.

> The  fsl,qman-channel-id property is used in Linux and corresponds to a
> hardware value that indicates which channel is dedicated to the
> software portal.
> 
> While I'm not aware of a current SoC where the channel ID for a
> software portal does not match the index (i.e. SWP 0 uses channel 0,
> etc.) 

Thus there's no backward compatibility issue with redefining cell-index
to mean the channel ID.

> it is possible that future SoCs could stray from this model,
> there is no reason for portal index to equal channel ID at all times.

How can future SoCs dictate how we assign a software-defined identifier?
If software wants it to be the same as the channel id, then it will be.

If there is some aspect of the hardware itself (not the documentation)
that cell-index currently corresponds to, other than the channel id,
please make that clear.

-Scott


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index
  2015-05-05 20:45       ` Scott Wood
@ 2015-05-12 21:19         ` Roy Pledge
       [not found]           ` <BN3PR0301MB1267E5A61E7E5BC2789F9E898CDA0-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Roy Pledge @ 2015-05-12 21:19 UTC (permalink / raw)
  To: Scott Wood
  Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Madalin-Cristian Bucur

> >
> > I don't believe this is correct - let me explain the rational why we had two
> properties in the QMan portal to begin with.
> >
> > The two properties in question are cell-index and fsl,qman-channel-id.
> >
> > The cell-index property is used in u-boot as an index for the software portal
> ID when adding the fsl,liodn from the U-boot table into the device tree.
> 
> The device tree is not supposed to contain arbitrary software identifiers.

I agree - this is why the original device tree bindings removed cell-index as it can be calculated.
Unfortunately u-boot relied on this value being present so to be backward compatible we don't have a way to remove it.  I'm not sure on what the procedure is to change things u-boot relies on, I personal have always been very uncomfortable with the coupling between u-boot and Linux for things like this. 

> 
> > The  fsl,qman-channel-id property is used in Linux and corresponds to
> > a hardware value that indicates which channel is dedicated to the
> > software portal.
> >
> > While I'm not aware of a current SoC where the channel ID for a
> > software portal does not match the index (i.e. SWP 0 uses channel 0,
> > etc.)
> 
> Thus there's no backward compatibility issue with redefining cell-index to
> mean the channel ID.

Channel IDs do change and are defined when the SoC is created (look at checks for QMan versions and adjustments for Pool Channel IDs in the driver).  If the channel ID for portal 0 ever becomes non zero we just end up having to make a mess in the code or reintroduce this field.

> 
> > it is possible that future SoCs could stray from this model, there is
> > no reason for portal index to equal channel ID at all times.
> 
> How can future SoCs dictate how we assign a software-defined identifier?
> If software wants it to be the same as the channel id, then it will be.
> 
> If there is some aspect of the hardware itself (not the documentation) that
> cell-index currently corresponds to, other than the channel id, please make
> that clear.

Channel ID is defined in the SoC RTL - it is not controlled by software and it is not a software assigned identifier.  It is not possible for SW to set these values.

Roy
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index
       [not found]           ` <BN3PR0301MB1267E5A61E7E5BC2789F9E898CDA0-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2015-05-12 22:46             ` Scott Wood
       [not found]               ` <1431470762.16357.511.camel-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Scott Wood @ 2015-05-12 22:46 UTC (permalink / raw)
  To: Pledge Roy-R01356
  Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Bucur Madalin-Cristian-B32716

On Tue, 2015-05-12 at 16:19 -0500, Pledge Roy-R01356 wrote:
> > >
> > > I don't believe this is correct - let me explain the rational why we had two
> > properties in the QMan portal to begin with.
> > >
> > > The two properties in question are cell-index and fsl,qman-channel-id.
> > >
> > > The cell-index property is used in u-boot as an index for the software portal
> > ID when adding the fsl,liodn from the U-boot table into the device tree.
> > 
> > The device tree is not supposed to contain arbitrary software identifiers.
> 
> I agree - this is why the original device tree bindings removed
> cell-index as it can be calculated.
 Unfortunately u-boot relied on
> this value being present so to be backward compatible we don't have a
> way to remove it.  I'm not sure on what the procedure is to change
> things u-boot relies on, 

Generally the procedure is that we don't change it.  It wouldn't be so
bad if using an old U-Boot just meant that datapath doesn't work with
upstream kernels (since that doesn't work now), but a dts that makes
existing U-Boot crash is another matter.

> I personal have always been very uncomfortable with the coupling
> between u-boot and Linux for things like this. 

Same here.  I've said for a while that I thought the dtses should live
in the U-Boot tree due to such coupling (the dtb/kernel interface has
well-defined binding documents; the dts/U-Boot interface doesn't), but
nobody else seemed interested.  It would also be good to minimize new
U-Boot fixups in favor of having the kernel do it, even if it results
in unpleasant code duplication.


> > 
> > > The  fsl,qman-channel-id property is used in Linux and corresponds to
> > > a hardware value that indicates which channel is dedicated to the
> > > software portal.
> > >
> > > While I'm not aware of a current SoC where the channel ID for a
> > > software portal does not match the index (i.e. SWP 0 uses channel 0,
> > > etc.)
> > 
> > Thus there's no backward compatibility issue with redefining cell-index to
> > mean the channel ID.
> 
> Channel IDs do change and are defined when the SoC is created

But for SoCs that already exist, they won't change, right?  We don't
need to care about what existing U-Boot does on new SoCs, since U-Boot
would need to be changed to support the new SoC at all.

>  (look at checks for QMan versions and adjustments for Pool Channel IDs
> in the driver).  If the channel ID for portal 0 ever becomes non zero
> we just end up having to make a mess in the code or reintroduce this
> field.

What defines that portal as "portal 0"?

> > > it is possible that future SoCs could stray from this model, there is
> > > no reason for portal index to equal channel ID at all times.
> > 
> > How can future SoCs dictate how we assign a software-defined identifier?
> > If software wants it to be the same as the channel id, then it will be.
> > 
> > If there is some aspect of the hardware itself (not the documentation) that
> > cell-index currently corresponds to, other than the channel id, please make
> > that clear.
> 
> Channel ID is defined in the SoC RTL - it is not controlled by software
> and it is not a software assigned identifier.  It is not possible for
> SW to set these values.

I said "other than the channel id".  In particular, I was asking about
the concept of "portal index".

-Scott


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index
       [not found]               ` <1431470762.16357.511.camel-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2015-08-19 20:52                 ` Roy Pledge
       [not found]                   ` <BN3PR0301MB12670C0BE318280D1C53FE0F8C670-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Roy Pledge @ 2015-08-19 20:52 UTC (permalink / raw)
  To: Scott Wood
  Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Madalin-Cristian Bucur, Haiying Wang

Sorry for digging up an old thread here Scott, but we never did close on this discussion.  See my replies inline below....

> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Tuesday, May 12, 2015 6:46 PM
> To: Pledge Roy-R01356
> Cc: linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org; Bucur
> Madalin-Cristian-B32716
> Subject: Re: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-
> index
> 
> On Tue, 2015-05-12 at 16:19 -0500, Pledge Roy-R01356 wrote:
> > > >
> > > > I don't believe this is correct - let me explain the rational why
> > > > we had two
> > > properties in the QMan portal to begin with.
> > > >
> > > > The two properties in question are cell-index and fsl,qman-channel-id.
> > > >
> > > > The cell-index property is used in u-boot as an index for the
> > > > software portal
> > > ID when adding the fsl,liodn from the U-boot table into the device tree.
> > >
> > > The device tree is not supposed to contain arbitrary software identifiers.
> >
> > I agree - this is why the original device tree bindings removed
> > cell-index as it can be calculated.
>  Unfortunately u-boot relied on
> > this value being present so to be backward compatible we don't have a
> > way to remove it.  I'm not sure on what the procedure is to change
> > things u-boot relies on,
> 
> Generally the procedure is that we don't change it.  It wouldn't be so bad if
> using an old U-Boot just meant that datapath doesn't work with upstream
> kernels (since that doesn't work now), but a dts that makes existing U-Boot
> crash is another matter.

If this is true then we can never remove the cell-index property.  The cell-index in this case is referring to the portal index which could be calculated from the qman-portal@XXXX value.  My preference would be to eliminate cell-index and replace it with this calculation but that would mean older u-boot would fail to work with newer kernel.  While the bug that caused older u-boot to crash if this property is annoying this has been addressed in more recent u-boots. I can't comment on a policy where u-boot must always boot newer version of Linux - that means Linux will have to drag along baggage like this property for a long time (forever?). 

> > >
> > > > The  fsl,qman-channel-id property is used in Linux and corresponds
> > > > to a hardware value that indicates which channel is dedicated to
> > > > the software portal.
> > > >
> > > > While I'm not aware of a current SoC where the channel ID for a
> > > > software portal does not match the index (i.e. SWP 0 uses channel
> > > > 0,
> > > > etc.)
> > >
> > > Thus there's no backward compatibility issue with redefining
> > > cell-index to mean the channel ID.
> >
> > Channel IDs do change and are defined when the SoC is created
> 
> But for SoCs that already exist, they won't change, right?  We don't need to
> care about what existing U-Boot does on new SoCs, since U-Boot would
> need to be changed to support the new SoC at all.

This code isn't looking at SoC product numbers - the whole point of putting this in the device tree is to avoid doing just that.  If we had to add code for each SoC to u-boot we may as well get rid of the device tree and hardcode this configuration in the source file that is SoC specific.

> 
> >  (look at checks for QMan versions and adjustments for Pool Channel
> > IDs in the driver).  If the channel ID for portal 0 ever becomes non
> > zero we just end up having to make a mess in the code or reintroduce
> > this field.
> 
> What defines that portal as "portal 0"?

Portal 0 is portal 0 because it is at offset 0 in the QMan portal memory region.  Portal 1 is at 0x4000 etc...  Note that this is not the case for forthcoming ARM devices as portals are distributed at 64K intervals.  However since the device tree parsing code for ARM is separate from the PPC code this will not pose any issue.


> 
> > > > it is possible that future SoCs could stray from this model, there
> > > > is no reason for portal index to equal channel ID at all times.
> > >
> > > How can future SoCs dictate how we assign a software-defined
> identifier?
> > > If software wants it to be the same as the channel id, then it will be.
> > >
> > > If there is some aspect of the hardware itself (not the
> > > documentation) that cell-index currently corresponds to, other than
> > > the channel id, please make that clear.
> >
> > Channel ID is defined in the SoC RTL - it is not controlled by
> > software and it is not a software assigned identifier.  It is not
> > possible for SW to set these values.
> 
> I said "other than the channel id".  In particular, I was asking about the
> concept of "portal index".

The only thing cell-index indicates is the offset of the portal in the QMan address space.  Linux doesn't look at this value.  If we can get past the issue of old u-boots not working I would happily produce patches that remove this from u-boot and the device trees and start using unit-address for determining which portal is being indexed.  Since channel-id is a property of a portal I believe it should be left as is. If not I believe it is best to leave both values in place 

Roy
 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index
       [not found]                   ` <BN3PR0301MB12670C0BE318280D1C53FE0F8C670-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2015-08-19 21:30                     ` Scott Wood
       [not found]                       ` <20150819213021.GA22290-vONcSABrMOVpTrP2zolEsF6hYfS7NtTn@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Scott Wood @ 2015-08-19 21:30 UTC (permalink / raw)
  To: Pledge Roy-R01356
  Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Bucur Madalin-Cristian-B32716, Wang Haiying-R54964

On Wed, Aug 19, 2015 at 03:52:55PM -0500, Pledge Roy-R01356 wrote:
> Sorry for digging up an old thread here Scott, but we never did close on this discussion.  See my replies inline below....
> 
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, May 12, 2015 6:46 PM
> > To: Pledge Roy-R01356
> > Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Bucur
> > Madalin-Cristian-B32716
> > Subject: Re: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-
> > index
> > 
> > On Tue, 2015-05-12 at 16:19 -0500, Pledge Roy-R01356 wrote:
> > > > >
> > > > > I don't believe this is correct - let me explain the rational why
> > > > > we had two
> > > > properties in the QMan portal to begin with.
> > > > >
> > > > > The two properties in question are cell-index and fsl,qman-channel-id.
> > > > >
> > > > > The cell-index property is used in u-boot as an index for the
> > > > > software portal
> > > > ID when adding the fsl,liodn from the U-boot table into the device tree.
> > > >
> > > > The device tree is not supposed to contain arbitrary software identifiers.
> > >
> > > I agree - this is why the original device tree bindings removed
> > > cell-index as it can be calculated.
> >  Unfortunately u-boot relied on
> > > this value being present so to be backward compatible we don't have a
> > > way to remove it.  I'm not sure on what the procedure is to change
> > > things u-boot relies on,
> > 
> > Generally the procedure is that we don't change it.  It wouldn't be so bad if
> > using an old U-Boot just meant that datapath doesn't work with upstream
> > kernels (since that doesn't work now), but a dts that makes existing U-Boot
> > crash is another matter.
> 
> If this is true then we can never remove the cell-index property.

Correct.

> The cell-index in this case is referring to the portal index which
> could be calculated from the qman-portal@XXXX value.  My preference
> would be to eliminate cell-index and replace it with this calculation
> but that would mean older u-boot would fail to work with newer kernel. 
> While the bug that caused older u-boot to crash if this property is
> annoying this has been addressed in more recent u-boots.  I can't
> comment on a policy where u-boot must always boot newer version of
> Linux - that means Linux will have to drag along baggage like this
> property for a long time (forever?).

The baggage isn't particularly onerous.  It's just using a suboptimal
property name.  The semantics are exactly the same as
fsl,qman-channel-id.

> > > >
> > > > > The  fsl,qman-channel-id property is used in Linux and corresponds
> > > > > to a hardware value that indicates which channel is dedicated to
> > > > > the software portal.
> > > > >
> > > > > While I'm not aware of a current SoC where the channel ID for a
> > > > > software portal does not match the index (i.e. SWP 0 uses channel
> > > > > 0,
> > > > > etc.)
> > > >
> > > > Thus there's no backward compatibility issue with redefining
> > > > cell-index to mean the channel ID.
> > >
> > > Channel IDs do change and are defined when the SoC is created
> > 
> > But for SoCs that already exist, they won't change, right?  We don't need to
> > care about what existing U-Boot does on new SoCs, since U-Boot would
> > need to be changed to support the new SoC at all.
> 
> This code isn't looking at SoC product numbers - the whole point of
> putting this in the device tree is to avoid doing just that.  If we had
> to add code for each SoC to u-boot we may as well get rid of the device
> tree and hardcode this configuration in the source file that is SoC
> specific.

The point of putting this in the device tree is to avoid per-SoC code in
*Linux*.  U-Boot does use the device tree for similar purposes on some
platforms, but that's not something we've done yet.  I'm not sure how
it's relevant, though.  How would it be different if we had
fsl,qman-channel-id and no cell-index?

When I mentioned U-Boot needing to be updated for new SoCs, I meant to
run in general, not specifically the QMan code.  So, needing to be
compatible with existing QMan code is only an issue for SoCs where an
older U-Boot actually exists.  We don't need to care what the old code
would have done on newer SoCs.

> > >  (look at checks for QMan versions and adjustments for Pool Channel
> > > IDs in the driver).  If the channel ID for portal 0 ever becomes non
> > > zero we just end up having to make a mess in the code or reintroduce
> > > this field.
> > 
> > What defines that portal as "portal 0"?
> 
> Portal 0 is portal 0 because it is at offset 0 in the QMan portal
> memory region.  Portal 1 is at 0x4000 etc...  Note that this is not the
> case for forthcoming ARM devices as portals are distributed at 64K
> intervals.  However since the device tree parsing code for ARM is
> separate from the PPC code this will not pose any issue.

I don't understand why it would cause an issue in any case.  U-Boot would
need to either know the mapping from portal address to channel id, or get
it from the device tree.  There's no need to introduce the concept of
"portal number" except perhaps as some internal implementation detail.

> 
> > 
> > > > > it is possible that future SoCs could stray from this model, there
> > > > > is no reason for portal index to equal channel ID at all times.
> > > >
> > > > How can future SoCs dictate how we assign a software-defined
> > identifier?
> > > > If software wants it to be the same as the channel id, then it will be.
> > > >
> > > > If there is some aspect of the hardware itself (not the
> > > > documentation) that cell-index currently corresponds to, other than
> > > > the channel id, please make that clear.
> > >
> > > Channel ID is defined in the SoC RTL - it is not controlled by
> > > software and it is not a software assigned identifier.  It is not
> > > possible for SW to set these values.
> > 
> > I said "other than the channel id".  In particular, I was asking about the
> > concept of "portal index".
> 
> The only thing cell-index indicates is the offset of the portal in the
> QMan address space.

cell-index has been redefined to not mean that at all.  It now only means
channel ID.  We can do this because the value happens to be the same for
all existing SoCs (and we should be sure to avoid putting things into the
SDK for the aforementioned ARM chips that are contrary to the new
definition).

-Scott
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index
       [not found]                       ` <20150819213021.GA22290-vONcSABrMOVpTrP2zolEsF6hYfS7NtTn@public.gmane.org>
@ 2015-08-20 14:52                         ` Roy Pledge
       [not found]                           ` <BN3PR0301MB12675C1EC30FBC1E823161908C660-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Roy Pledge @ 2015-08-20 14:52 UTC (permalink / raw)
  To: Scott Wood
  Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Madalin-Cristian Bucur, Haiying Wang



> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Wednesday, August 19, 2015 5:30 PM
> To: Pledge Roy-R01356
> Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Bucur
> Madalin-Cristian-B32716; Wang Haiying-R54964
> Subject: Re: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-
> index
> 
> On Wed, Aug 19, 2015 at 03:52:55PM -0500, Pledge Roy-R01356 wrote:
> > Sorry for digging up an old thread here Scott, but we never did close on this
> discussion.  See my replies inline below....
> >
> > > -----Original Message-----
> > > From: Wood Scott-B07421
> > > Sent: Tuesday, May 12, 2015 6:46 PM
> > > To: Pledge Roy-R01356
> > > Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Bucur
> > > Madalin-Cristian-B32716
> > > Subject: Re: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to
> > > cell- index
> > >
> > > On Tue, 2015-05-12 at 16:19 -0500, Pledge Roy-R01356 wrote:
> > > > > >
> > > > > > I don't believe this is correct - let me explain the rational
> > > > > > why we had two
> > > > > properties in the QMan portal to begin with.
> > > > > >
> > > > > > The two properties in question are cell-index and fsl,qman-channel-
> id.
> > > > > >
> > > > > > The cell-index property is used in u-boot as an index for the
> > > > > > software portal
> > > > > ID when adding the fsl,liodn from the U-boot table into the device
> tree.
> > > > >
> > > > > The device tree is not supposed to contain arbitrary software
> identifiers.
> > > >
> > > > I agree - this is why the original device tree bindings removed
> > > > cell-index as it can be calculated.
> > >  Unfortunately u-boot relied on
> > > > this value being present so to be backward compatible we don't
> > > > have a way to remove it.  I'm not sure on what the procedure is to
> > > > change things u-boot relies on,
> > >
> > > Generally the procedure is that we don't change it.  It wouldn't be
> > > so bad if using an old U-Boot just meant that datapath doesn't work
> > > with upstream kernels (since that doesn't work now), but a dts that
> > > makes existing U-Boot crash is another matter.
> >
> > If this is true then we can never remove the cell-index property.
> 
> Correct.
> 
> > The cell-index in this case is referring to the portal index which
> > could be calculated from the qman-portal@XXXX value.  My preference
> > would be to eliminate cell-index and replace it with this calculation
> > but that would mean older u-boot would fail to work with newer kernel.
> > While the bug that caused older u-boot to crash if this property is
> > annoying this has been addressed in more recent u-boots.  I can't
> > comment on a policy where u-boot must always boot newer version of
> > Linux - that means Linux will have to drag along baggage like this
> > property for a long time (forever?).
> 
> The baggage isn't particularly onerous.  It's just using a suboptimal property
> name.  The semantics are exactly the same as fsl,qman-channel-id.
> 
> > > > >
> > > > > > The  fsl,qman-channel-id property is used in Linux and
> > > > > > corresponds to a hardware value that indicates which channel
> > > > > > is dedicated to the software portal.
> > > > > >
> > > > > > While I'm not aware of a current SoC where the channel ID for
> > > > > > a software portal does not match the index (i.e. SWP 0 uses
> > > > > > channel 0,
> > > > > > etc.)
> > > > >
> > > > > Thus there's no backward compatibility issue with redefining
> > > > > cell-index to mean the channel ID.
> > > >
> > > > Channel IDs do change and are defined when the SoC is created
> > >
> > > But for SoCs that already exist, they won't change, right?  We don't
> > > need to care about what existing U-Boot does on new SoCs, since
> > > U-Boot would need to be changed to support the new SoC at all.
> >
> > This code isn't looking at SoC product numbers - the whole point of
> > putting this in the device tree is to avoid doing just that.  If we
> > had to add code for each SoC to u-boot we may as well get rid of the
> > device tree and hardcode this configuration in the source file that is
> > SoC specific.
> 
> The point of putting this in the device tree is to avoid per-SoC code in
> *Linux*.  U-Boot does use the device tree for similar purposes on some
> platforms, but that's not something we've done yet.  I'm not sure how it's
> relevant, though.  How would it be different if we had fsl,qman-channel-id
> and no cell-index?

I guess my point isn't getting through - channel-id and cell-index are too independent concepts that are coincidentally the same. Cell-index is only used by u-boot and is used to determine the portal number.  It is absolutely possible that we produce and SoC where portal number 0 has channel 0x1000.  We've changed these things in the past as well - this is why we introduced the channel-id property.  This is also consistent with other blocks (FMan, PME, DCE) that have channels associated with them.  

The cell-index is useless - the portal ID can be derived from the portal address.  The fact that you're unwilling to  remove cell-index doesn't mean that channel-id is redundant and should be removed.


> 
> When I mentioned U-Boot needing to be updated for new SoCs, I meant to
> run in general, not specifically the QMan code.  So, needing to be compatible
> with existing QMan code is only an issue for SoCs where an older U-Boot
> actually exists.  We don't need to care what the old code would have done
> on newer SoCs.
> 
> > > >  (look at checks for QMan versions and adjustments for Pool
> > > > Channel IDs in the driver).  If the channel ID for portal 0 ever
> > > > becomes non zero we just end up having to make a mess in the code
> > > > or reintroduce this field.
> > >
> > > What defines that portal as "portal 0"?
> >
> > Portal 0 is portal 0 because it is at offset 0 in the QMan portal
> > memory region.  Portal 1 is at 0x4000 etc...  Note that this is not
> > the case for forthcoming ARM devices as portals are distributed at 64K
> > intervals.  However since the device tree parsing code for ARM is
> > separate from the PPC code this will not pose any issue.
> 
> I don't understand why it would cause an issue in any case.  U-Boot would
> need to either know the mapping from portal address to channel id, or get it
> from the device tree.  There's no need to introduce the concept of "portal
> number" except perhaps as some internal implementation detail.
> 
> >
> > >
> > > > > > it is possible that future SoCs could stray from this model,
> > > > > > there is no reason for portal index to equal channel ID at all times.
> > > > >
> > > > > How can future SoCs dictate how we assign a software-defined
> > > identifier?
> > > > > If software wants it to be the same as the channel id, then it will be.
> > > > >
> > > > > If there is some aspect of the hardware itself (not the
> > > > > documentation) that cell-index currently corresponds to, other
> > > > > than the channel id, please make that clear.
> > > >
> > > > Channel ID is defined in the SoC RTL - it is not controlled by
> > > > software and it is not a software assigned identifier.  It is not
> > > > possible for SW to set these values.
> > >
> > > I said "other than the channel id".  In particular, I was asking
> > > about the concept of "portal index".
> >
> > The only thing cell-index indicates is the offset of the portal in the
> > QMan address space.
> 
> cell-index has been redefined to not mean that at all.  It now only means
> channel ID.  We can do this because the value happens to be the same for all
> existing SoCs (and we should be sure to avoid putting things into the SDK for
> the aforementioned ARM chips that are contrary to the new definition).
> 

U-boot doesn't dictate the HW architecture and shouldn't - you're trying very hard not to admit you changed something you didn't fully understand and actually making the system harder to deal with.  At no point in time have we ever assumed portal ID would equal channel id.  With your logic u-boot is broken because it is using channel ID to index into an array that is per portal not per channel.  We shouldn't have removed channel-id in the first place - trying to redefine that portals = channels is just plain incorrect.  If we can't remove cell-index then we have to live with that - trying to defend removing channel-id because for some cases portal-id = channel-id is wrong.  The fact that someone though cell-index was a good idea in the first place is the error - that data already exists in
  the device tree in the offset field.  We need channel-id to be consistent with other device tree nodes and because portal-id != cell-index.  I'm not sure how else to get through to you on this, your base assumption is wrong.

> -Scott
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index
       [not found]                           ` <BN3PR0301MB12675C1EC30FBC1E823161908C660-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2015-08-20 16:53                             ` Scott Wood
  0 siblings, 0 replies; 10+ messages in thread
From: Scott Wood @ 2015-08-20 16:53 UTC (permalink / raw)
  To: Pledge Roy-R01356
  Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Bucur Madalin-Cristian-B32716, Wang Haiying-R54964

On Thu, Aug 20, 2015 at 09:52:46AM -0500, Pledge Roy-R01356 wrote:
> I guess my point isn't getting through - channel-id and cell-index are
> too independent concepts that are coincidentally the same.  Cell-index
> is only used by u-boot and is used to determine the portal number.  It
> is absolutely possible that we produce and SoC where portal number 0
> has channel 0x1000.  We've changed these things in the past as well -
> this is why we introduced the channel-id property.  This is also
> consistent with other blocks (FMan, PME, DCE) that have channels
> associated with them.
> 
> The cell-index is useless - the portal ID can be derived from the
> portal address.  The fact that you're unwilling to remove cell-index
> doesn't mean that channel-id is redundant and should be removed.

I guess my point isn't getting through.  Any concept that cell-index
represented that was not identical to channel id is dead and gone, as is
the concept of "portal number".  Every time you see cell-index just
pretend you are seeing fsl,qman-channel-id.

cell-index is *not* defined as anything to do with the portal address.

> > > The only thing cell-index indicates is the offset of the portal in the
> > > QMan address space.
> > 
> > cell-index has been redefined to not mean that at all.  It now only means
> > channel ID.  We can do this because the value happens to be the same for all
> > existing SoCs (and we should be sure to avoid putting things into the SDK for
> > the aforementioned ARM chips that are contrary to the new definition).
> > 
> 
> U-boot doesn't dictate the HW architecture and shouldn't - you're
> trying very hard not to admit you changed something you didn't fully
> understand and actually making the system harder to deal with.  At no
> point in time have we ever assumed portal ID would equal channel id. 

cell-index does not mean "portal ID".

> With your logic u-boot is broken because it is using channel ID to
> index into an array that is per portal not per channel.  We shouldn't
> have removed channel-id in the first place - trying to redefine that
> portals = channels is just plain incorrect.

That's not what happened.

> I'm not sure how else to get through to you on this, your base
> assumption is wrong.

Likewise.

-Scott
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-08-20 16:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17 22:53 [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index Scott Wood
     [not found] ` <1429311187-19062-1-git-send-email-scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-04-17 22:53   ` [PATCH 2/2] powerpc/mpc85xx: Add FSL QorIQ DPAA QMan support to device tree(s) Scott Wood
2015-05-05 16:04   ` [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index Roy Pledge
     [not found]     ` <BN3PR0301MB126796C0EC18EEBB26702C588CD10-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-05-05 20:45       ` Scott Wood
2015-05-12 21:19         ` Roy Pledge
     [not found]           ` <BN3PR0301MB1267E5A61E7E5BC2789F9E898CDA0-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-05-12 22:46             ` Scott Wood
     [not found]               ` <1431470762.16357.511.camel-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-08-19 20:52                 ` Roy Pledge
     [not found]                   ` <BN3PR0301MB12670C0BE318280D1C53FE0F8C670-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-08-19 21:30                     ` Scott Wood
     [not found]                       ` <20150819213021.GA22290-vONcSABrMOVpTrP2zolEsF6hYfS7NtTn@public.gmane.org>
2015-08-20 14:52                         ` Roy Pledge
     [not found]                           ` <BN3PR0301MB12675C1EC30FBC1E823161908C660-CEkquS/Gb80KBjv5qxT+hJwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-08-20 16:53                             ` Scott Wood

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).