All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-01 20:28 ` WingMan Kwok
  0 siblings, 0 replies; 39+ messages in thread
From: WingMan Kwok @ 2015-09-01 20:28 UTC (permalink / raw)
  To: robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak, linux,
	devicetree, linux-arm-kernel, linux-kernel, ssantosh
  Cc: m-karicheri2, WingMan Kwok

Network subsystem NetCP in Keystone-2 devices includes some HW blocks
that are memory mapped to ranges outside that of the NetCP itself.
Thus address space of a child node of the NetCP node needs to be
mapped 1:1 onto the parent address space.  Hence empty ranges
should be used under the NetCP node.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
---
 arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
 arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
 arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
 3 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-netcp.dtsi
index b13b3c9..e103ed9 100644
--- a/arch/arm/boot/dts/k2e-netcp.dtsi
+++ b/arch/arm/boot/dts/k2e-netcp.dtsi
@@ -111,9 +111,7 @@ netcp: netcp@24000000 {
 	compatible = "ti,netcp-1.0";
 	#address-cells = <1>;
 	#size-cells = <1>;
-
-	/* NetCP address range */
-	ranges = <0 0x24000000 0x1000000>;
+	ranges;
 
 	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
 	dma-coherent;
@@ -127,10 +125,10 @@ netcp: netcp@24000000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		gbe@200000 { /* ETHSS */
+		gbe@24200000 { /* ETHSS */
 			label = "netcp-gbe";
 			compatible = "ti,netcp-gbe-9";
-			reg = <0x200000 0x900>, <0x220000 0x20000>;
+			reg = <0x24200000 0x900>, <0x24220000 0x20000>;
 			/* enable-ale; */
 			tx-queue = <896>;
 			tx-channel = "nettx";
diff --git a/arch/arm/boot/dts/k2hk-netcp.dtsi b/arch/arm/boot/dts/k2hk-netcp.dtsi
index 77a32c3..3b885f5 100644
--- a/arch/arm/boot/dts/k2hk-netcp.dtsi
+++ b/arch/arm/boot/dts/k2hk-netcp.dtsi
@@ -127,9 +127,7 @@ netcp: netcp@2000000 {
 	compatible = "ti,netcp-1.0";
 	#address-cells = <1>;
 	#size-cells = <1>;
-
-	/* NetCP address range */
-	ranges  = <0 0x2000000 0x100000>;
+	ranges;
 
 	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
 	dma-coherent;
@@ -140,15 +138,15 @@ netcp: netcp@2000000 {
 	ti,navigator-dma-names = "netrx0", "netrx1", "nettx";
 
 	netcp-devices {
-		ranges;
 		#address-cells = <1>;
 		#size-cells = <1>;
-		gbe@90000 { /* ETHSS */
-			#address-cells = <1>;
-			#size-cells = <1>;
+		ranges;
+		gbe@2090000 { /* ETHSS */
 			label = "netcp-gbe";
 			compatible = "ti,netcp-gbe";
-			reg = <0x90000 0x300>, <0x90400 0x400>, <0x90800 0x700>;
+			reg = <0x02090000 0x300>,
+			      <0x02090400 0x400>,
+			      <0x02090800 0x700>;
 			/* enable-ale; */
 			tx-queue = <648>;
 			tx-channel = "nettx";
diff --git a/arch/arm/boot/dts/k2l-netcp.dtsi b/arch/arm/boot/dts/k2l-netcp.dtsi
index 6b95284..97ae805 100644
--- a/arch/arm/boot/dts/k2l-netcp.dtsi
+++ b/arch/arm/boot/dts/k2l-netcp.dtsi
@@ -110,9 +110,7 @@ netcp: netcp@26000000 {
 	compatible = "ti,netcp-1.0";
 	#address-cells = <1>;
 	#size-cells = <1>;
-
-	/* NetCP address range */
-	ranges = <0 0x26000000 0x1000000>;
+	ranges;
 
 	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
 	dma-coherent;
@@ -126,10 +124,10 @@ netcp: netcp@26000000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		gbe@200000 { /* ETHSS */
+		gbe@26200000 { /* ETHSS */
 			label = "netcp-gbe";
 			compatible = "ti,netcp-gbe-5";
-			reg = <0x200000 0x900>, <0x220000 0x20000>;
+			reg = <0x26200000 0x900>, <0x26220000 0x20000>;
 			/* enable-ale; */
 			tx-queue = <896>;
 			tx-channel = "nettx";
-- 
1.7.9.5


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

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-01 20:28 ` WingMan Kwok
  0 siblings, 0 replies; 39+ messages in thread
From: WingMan Kwok @ 2015-09-01 20:28 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ssantosh-DgEjT+Ai2ygdnm+yROfE0A
  Cc: m-karicheri2-l0cyMroinI0, WingMan Kwok

Network subsystem NetCP in Keystone-2 devices includes some HW blocks
that are memory mapped to ranges outside that of the NetCP itself.
Thus address space of a child node of the NetCP node needs to be
mapped 1:1 onto the parent address space.  Hence empty ranges
should be used under the NetCP node.

Signed-off-by: WingMan Kwok <w-kwok2-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
 arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
 arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
 3 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-netcp.dtsi
index b13b3c9..e103ed9 100644
--- a/arch/arm/boot/dts/k2e-netcp.dtsi
+++ b/arch/arm/boot/dts/k2e-netcp.dtsi
@@ -111,9 +111,7 @@ netcp: netcp@24000000 {
 	compatible = "ti,netcp-1.0";
 	#address-cells = <1>;
 	#size-cells = <1>;
-
-	/* NetCP address range */
-	ranges = <0 0x24000000 0x1000000>;
+	ranges;
 
 	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
 	dma-coherent;
@@ -127,10 +125,10 @@ netcp: netcp@24000000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		gbe@200000 { /* ETHSS */
+		gbe@24200000 { /* ETHSS */
 			label = "netcp-gbe";
 			compatible = "ti,netcp-gbe-9";
-			reg = <0x200000 0x900>, <0x220000 0x20000>;
+			reg = <0x24200000 0x900>, <0x24220000 0x20000>;
 			/* enable-ale; */
 			tx-queue = <896>;
 			tx-channel = "nettx";
diff --git a/arch/arm/boot/dts/k2hk-netcp.dtsi b/arch/arm/boot/dts/k2hk-netcp.dtsi
index 77a32c3..3b885f5 100644
--- a/arch/arm/boot/dts/k2hk-netcp.dtsi
+++ b/arch/arm/boot/dts/k2hk-netcp.dtsi
@@ -127,9 +127,7 @@ netcp: netcp@2000000 {
 	compatible = "ti,netcp-1.0";
 	#address-cells = <1>;
 	#size-cells = <1>;
-
-	/* NetCP address range */
-	ranges  = <0 0x2000000 0x100000>;
+	ranges;
 
 	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
 	dma-coherent;
@@ -140,15 +138,15 @@ netcp: netcp@2000000 {
 	ti,navigator-dma-names = "netrx0", "netrx1", "nettx";
 
 	netcp-devices {
-		ranges;
 		#address-cells = <1>;
 		#size-cells = <1>;
-		gbe@90000 { /* ETHSS */
-			#address-cells = <1>;
-			#size-cells = <1>;
+		ranges;
+		gbe@2090000 { /* ETHSS */
 			label = "netcp-gbe";
 			compatible = "ti,netcp-gbe";
-			reg = <0x90000 0x300>, <0x90400 0x400>, <0x90800 0x700>;
+			reg = <0x02090000 0x300>,
+			      <0x02090400 0x400>,
+			      <0x02090800 0x700>;
 			/* enable-ale; */
 			tx-queue = <648>;
 			tx-channel = "nettx";
diff --git a/arch/arm/boot/dts/k2l-netcp.dtsi b/arch/arm/boot/dts/k2l-netcp.dtsi
index 6b95284..97ae805 100644
--- a/arch/arm/boot/dts/k2l-netcp.dtsi
+++ b/arch/arm/boot/dts/k2l-netcp.dtsi
@@ -110,9 +110,7 @@ netcp: netcp@26000000 {
 	compatible = "ti,netcp-1.0";
 	#address-cells = <1>;
 	#size-cells = <1>;
-
-	/* NetCP address range */
-	ranges = <0 0x26000000 0x1000000>;
+	ranges;
 
 	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
 	dma-coherent;
@@ -126,10 +124,10 @@ netcp: netcp@26000000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		gbe@200000 { /* ETHSS */
+		gbe@26200000 { /* ETHSS */
 			label = "netcp-gbe";
 			compatible = "ti,netcp-gbe-5";
-			reg = <0x200000 0x900>, <0x220000 0x20000>;
+			reg = <0x26200000 0x900>, <0x26220000 0x20000>;
 			/* enable-ale; */
 			tx-queue = <896>;
 			tx-channel = "nettx";
-- 
1.7.9.5

--
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] 39+ messages in thread

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-01 20:28 ` WingMan Kwok
  0 siblings, 0 replies; 39+ messages in thread
From: WingMan Kwok @ 2015-09-01 20:28 UTC (permalink / raw)
  To: linux-arm-kernel

Network subsystem NetCP in Keystone-2 devices includes some HW blocks
that are memory mapped to ranges outside that of the NetCP itself.
Thus address space of a child node of the NetCP node needs to be
mapped 1:1 onto the parent address space.  Hence empty ranges
should be used under the NetCP node.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
---
 arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
 arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
 arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
 3 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-netcp.dtsi
index b13b3c9..e103ed9 100644
--- a/arch/arm/boot/dts/k2e-netcp.dtsi
+++ b/arch/arm/boot/dts/k2e-netcp.dtsi
@@ -111,9 +111,7 @@ netcp: netcp at 24000000 {
 	compatible = "ti,netcp-1.0";
 	#address-cells = <1>;
 	#size-cells = <1>;
-
-	/* NetCP address range */
-	ranges = <0 0x24000000 0x1000000>;
+	ranges;
 
 	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
 	dma-coherent;
@@ -127,10 +125,10 @@ netcp: netcp at 24000000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		gbe at 200000 { /* ETHSS */
+		gbe at 24200000 { /* ETHSS */
 			label = "netcp-gbe";
 			compatible = "ti,netcp-gbe-9";
-			reg = <0x200000 0x900>, <0x220000 0x20000>;
+			reg = <0x24200000 0x900>, <0x24220000 0x20000>;
 			/* enable-ale; */
 			tx-queue = <896>;
 			tx-channel = "nettx";
diff --git a/arch/arm/boot/dts/k2hk-netcp.dtsi b/arch/arm/boot/dts/k2hk-netcp.dtsi
index 77a32c3..3b885f5 100644
--- a/arch/arm/boot/dts/k2hk-netcp.dtsi
+++ b/arch/arm/boot/dts/k2hk-netcp.dtsi
@@ -127,9 +127,7 @@ netcp: netcp at 2000000 {
 	compatible = "ti,netcp-1.0";
 	#address-cells = <1>;
 	#size-cells = <1>;
-
-	/* NetCP address range */
-	ranges  = <0 0x2000000 0x100000>;
+	ranges;
 
 	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
 	dma-coherent;
@@ -140,15 +138,15 @@ netcp: netcp at 2000000 {
 	ti,navigator-dma-names = "netrx0", "netrx1", "nettx";
 
 	netcp-devices {
-		ranges;
 		#address-cells = <1>;
 		#size-cells = <1>;
-		gbe at 90000 { /* ETHSS */
-			#address-cells = <1>;
-			#size-cells = <1>;
+		ranges;
+		gbe at 2090000 { /* ETHSS */
 			label = "netcp-gbe";
 			compatible = "ti,netcp-gbe";
-			reg = <0x90000 0x300>, <0x90400 0x400>, <0x90800 0x700>;
+			reg = <0x02090000 0x300>,
+			      <0x02090400 0x400>,
+			      <0x02090800 0x700>;
 			/* enable-ale; */
 			tx-queue = <648>;
 			tx-channel = "nettx";
diff --git a/arch/arm/boot/dts/k2l-netcp.dtsi b/arch/arm/boot/dts/k2l-netcp.dtsi
index 6b95284..97ae805 100644
--- a/arch/arm/boot/dts/k2l-netcp.dtsi
+++ b/arch/arm/boot/dts/k2l-netcp.dtsi
@@ -110,9 +110,7 @@ netcp: netcp at 26000000 {
 	compatible = "ti,netcp-1.0";
 	#address-cells = <1>;
 	#size-cells = <1>;
-
-	/* NetCP address range */
-	ranges = <0 0x26000000 0x1000000>;
+	ranges;
 
 	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
 	dma-coherent;
@@ -126,10 +124,10 @@ netcp: netcp at 26000000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		gbe at 200000 { /* ETHSS */
+		gbe at 26200000 { /* ETHSS */
 			label = "netcp-gbe";
 			compatible = "ti,netcp-gbe-5";
-			reg = <0x200000 0x900>, <0x220000 0x20000>;
+			reg = <0x26200000 0x900>, <0x26220000 0x20000>;
 			/* enable-ale; */
 			tx-queue = <896>;
 			tx-channel = "nettx";
-- 
1.7.9.5

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-01 21:19   ` santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA
  0 siblings, 0 replies; 39+ messages in thread
From: santosh.shilimkar @ 2015-09-01 21:19 UTC (permalink / raw)
  To: WingMan Kwok, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
	galak, linux, devicetree, linux-arm-kernel, linux-kernel,
	ssantosh
  Cc: m-karicheri2

On 9/1/15 1:28 PM, WingMan Kwok wrote:
> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
> that are memory mapped to ranges outside that of the NetCP itself.
> Thus address space of a child node of the NetCP node needs to be
> mapped 1:1 onto the parent address space.  Hence empty ranges
> should be used under the NetCP node.
>
> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
> ---
>   arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>   arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>   arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>   3 files changed, 12 insertions(+), 18 deletions(-)
>
> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-netcp.dtsi
> index b13b3c9..e103ed9 100644
> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
> @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
>   	compatible = "ti,netcp-1.0";
>   	#address-cells = <1>;
>   	#size-cells = <1>;
> -
> -	/* NetCP address range */
> -	ranges = <0 0x24000000 0x1000000>;
> +	ranges;
>
What blocks are we talking here. We need to increase the
range if the current range isn't covering entire NETCP
address space. Removing range isn't a solution.

Regards,
Santosh


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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-01 21:19   ` santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA
  0 siblings, 0 replies; 39+ messages in thread
From: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA @ 2015-09-01 21:19 UTC (permalink / raw)
  To: WingMan Kwok, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ssantosh-DgEjT+Ai2ygdnm+yROfE0A
  Cc: m-karicheri2-l0cyMroinI0

On 9/1/15 1:28 PM, WingMan Kwok wrote:
> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
> that are memory mapped to ranges outside that of the NetCP itself.
> Thus address space of a child node of the NetCP node needs to be
> mapped 1:1 onto the parent address space.  Hence empty ranges
> should be used under the NetCP node.
>
> Signed-off-by: WingMan Kwok <w-kwok2-l0cyMroinI0@public.gmane.org>
> ---
>   arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>   arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>   arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>   3 files changed, 12 insertions(+), 18 deletions(-)
>
> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-netcp.dtsi
> index b13b3c9..e103ed9 100644
> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
> @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
>   	compatible = "ti,netcp-1.0";
>   	#address-cells = <1>;
>   	#size-cells = <1>;
> -
> -	/* NetCP address range */
> -	ranges = <0 0x24000000 0x1000000>;
> +	ranges;
>
What blocks are we talking here. We need to increase the
range if the current range isn't covering entire NETCP
address space. Removing range isn't a solution.

Regards,
Santosh

--
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] 39+ messages in thread

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-01 21:19   ` santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA
  0 siblings, 0 replies; 39+ messages in thread
From: santosh.shilimkar at oracle.com @ 2015-09-01 21:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/1/15 1:28 PM, WingMan Kwok wrote:
> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
> that are memory mapped to ranges outside that of the NetCP itself.
> Thus address space of a child node of the NetCP node needs to be
> mapped 1:1 onto the parent address space.  Hence empty ranges
> should be used under the NetCP node.
>
> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
> ---
>   arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>   arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>   arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>   3 files changed, 12 insertions(+), 18 deletions(-)
>
> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-netcp.dtsi
> index b13b3c9..e103ed9 100644
> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
> @@ -111,9 +111,7 @@ netcp: netcp at 24000000 {
>   	compatible = "ti,netcp-1.0";
>   	#address-cells = <1>;
>   	#size-cells = <1>;
> -
> -	/* NetCP address range */
> -	ranges = <0 0x24000000 0x1000000>;
> +	ranges;
>
What blocks are we talking here. We need to increase the
range if the current range isn't covering entire NETCP
address space. Removing range isn't a solution.

Regards,
Santosh

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

* RE: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 15:31     ` Kwok, WingMan
  0 siblings, 0 replies; 39+ messages in thread
From: Kwok, WingMan @ 2015-09-02 15:31 UTC (permalink / raw)
  To: santosh.shilimkar, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux, devicetree, linux-arm-kernel,
	linux-kernel, ssantosh
  Cc: Karicheri, Muralidharan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2331 bytes --]



> -----Original Message-----
> From: santosh.shilimkar@oracle.com [mailto:santosh.shilimkar@oracle.com]
> Sent: Tuesday, September 01, 2015 5:19 PM
> To: Kwok, WingMan; robh+dt@kernel.org; pawel.moll@arm.com;
> mark.rutland@arm.com; ijc+devicetree@hellion.org.uk; galak@codeaurora.org;
> linux@arm.linux.org.uk; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; ssantosh@kernel.org
> Cc: Karicheri, Muralidharan
> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address translations
> under netcp
> 
> On 9/1/15 1:28 PM, WingMan Kwok wrote:
> > Network subsystem NetCP in Keystone-2 devices includes some HW blocks
> > that are memory mapped to ranges outside that of the NetCP itself.
> > Thus address space of a child node of the NetCP node needs to be
> > mapped 1:1 onto the parent address space.  Hence empty ranges
> > should be used under the NetCP node.
> >
> > Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
> > ---
> >   arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
> >   arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
> >   arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
> >   3 files changed, 12 insertions(+), 18 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
> netcp.dtsi
> > index b13b3c9..e103ed9 100644
> > --- a/arch/arm/boot/dts/k2e-netcp.dtsi
> > +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
> > @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
> >   	compatible = "ti,netcp-1.0";
> >   	#address-cells = <1>;
> >   	#size-cells = <1>;
> > -
> > -	/* NetCP address range */
> > -	ranges = <0 0x24000000 0x1000000>;
> > +	ranges;
> >
> What blocks are we talking here. We need to increase the
> range if the current range isn't covering entire NETCP
> address space. Removing range isn't a solution.
> 

The Serdes.  It is a HW block inside the NetCP but its address
space starts from 0x0232a000.  We can change the base in the
ranges property to include the serdes.  But then offsets of
other HW blocks that are within the NetCP address range will be
relative to this new base and are not as documented in the HW
user guides.

Regards
WingMan
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* RE: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 15:31     ` Kwok, WingMan
  0 siblings, 0 replies; 39+ messages in thread
From: Kwok, WingMan @ 2015-09-02 15:31 UTC (permalink / raw)
  To: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ssantosh-DgEjT+Ai2ygdnm+yROfE0A
  Cc: Karicheri, Muralidharan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2360 bytes --]



> -----Original Message-----
> From: santosh.shilimkar@oracle.com [mailto:santosh.shilimkar@oracle.com]
> Sent: Tuesday, September 01, 2015 5:19 PM
> To: Kwok, WingMan; robh+dt@kernel.org; pawel.moll@arm.com;
> mark.rutland@arm.com; ijc+devicetree@hellion.org.uk; galak@codeaurora.org;
> linux@arm.linux.org.uk; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; ssantosh@kernel.org
> Cc: Karicheri, Muralidharan
> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address translations
> under netcp
> 
> On 9/1/15 1:28 PM, WingMan Kwok wrote:
> > Network subsystem NetCP in Keystone-2 devices includes some HW blocks
> > that are memory mapped to ranges outside that of the NetCP itself.
> > Thus address space of a child node of the NetCP node needs to be
> > mapped 1:1 onto the parent address space.  Hence empty ranges
> > should be used under the NetCP node.
> >
> > Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
> > ---
> >   arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
> >   arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
> >   arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
> >   3 files changed, 12 insertions(+), 18 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
> netcp.dtsi
> > index b13b3c9..e103ed9 100644
> > --- a/arch/arm/boot/dts/k2e-netcp.dtsi
> > +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
> > @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
> >   	compatible = "ti,netcp-1.0";
> >   	#address-cells = <1>;
> >   	#size-cells = <1>;
> > -
> > -	/* NetCP address range */
> > -	ranges = <0 0x24000000 0x1000000>;
> > +	ranges;
> >
> What blocks are we talking here. We need to increase the
> range if the current range isn't covering entire NETCP
> address space. Removing range isn't a solution.
> 

The Serdes.  It is a HW block inside the NetCP but its address
space starts from 0x0232a000.  We can change the base in the
ranges property to include the serdes.  But then offsets of
other HW blocks that are within the NetCP address range will be
relative to this new base and are not as documented in the HW
user guides.

Regards
WingMan
N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·zøœzÚÞz)í…æèw*\x1fjg¬±¨\x1e¶‰šŽŠÝ¢j.ïÛ°\½½MŽúgjÌæa×\x02››–' ™©Þ¢¸\f¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾\a«‘êçzZ+ƒùšŽŠÝ¢j"ú!¶i

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

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 15:31     ` Kwok, WingMan
  0 siblings, 0 replies; 39+ messages in thread
From: Kwok, WingMan @ 2015-09-02 15:31 UTC (permalink / raw)
  To: linux-arm-kernel



> -----Original Message-----
> From: santosh.shilimkar at oracle.com [mailto:santosh.shilimkar at oracle.com]
> Sent: Tuesday, September 01, 2015 5:19 PM
> To: Kwok, WingMan; robh+dt at kernel.org; pawel.moll at arm.com;
> mark.rutland at arm.com; ijc+devicetree at hellion.org.uk; galak at codeaurora.org;
> linux at arm.linux.org.uk; devicetree at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; linux-kernel at vger.kernel.org; ssantosh at kernel.org
> Cc: Karicheri, Muralidharan
> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address translations
> under netcp
> 
> On 9/1/15 1:28 PM, WingMan Kwok wrote:
> > Network subsystem NetCP in Keystone-2 devices includes some HW blocks
> > that are memory mapped to ranges outside that of the NetCP itself.
> > Thus address space of a child node of the NetCP node needs to be
> > mapped 1:1 onto the parent address space.  Hence empty ranges
> > should be used under the NetCP node.
> >
> > Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
> > ---
> >   arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
> >   arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
> >   arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
> >   3 files changed, 12 insertions(+), 18 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
> netcp.dtsi
> > index b13b3c9..e103ed9 100644
> > --- a/arch/arm/boot/dts/k2e-netcp.dtsi
> > +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
> > @@ -111,9 +111,7 @@ netcp: netcp at 24000000 {
> >   	compatible = "ti,netcp-1.0";
> >   	#address-cells = <1>;
> >   	#size-cells = <1>;
> > -
> > -	/* NetCP address range */
> > -	ranges = <0 0x24000000 0x1000000>;
> > +	ranges;
> >
> What blocks are we talking here. We need to increase the
> range if the current range isn't covering entire NETCP
> address space. Removing range isn't a solution.
> 

The Serdes.  It is a HW block inside the NetCP but its address
space starts from 0x0232a000.  We can change the base in the
ranges property to include the serdes.  But then offsets of
other HW blocks that are within the NetCP address range will be
relative to this new base and are not as documented in the HW
user guides.

Regards
WingMan

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
  2015-09-02 15:31     ` Kwok, WingMan
  (?)
@ 2015-09-02 15:50       ` santosh shilimkar
  -1 siblings, 0 replies; 39+ messages in thread
From: santosh shilimkar @ 2015-09-02 15:50 UTC (permalink / raw)
  To: Kwok, WingMan, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
	galak, linux, devicetree, linux-arm-kernel, linux-kernel,
	ssantosh
  Cc: Karicheri, Muralidharan

On 9/2/2015 8:31 AM, Kwok, WingMan wrote:
>
>
>> -----Original Message-----
>> From: santosh.shilimkar@oracle.com [mailto:santosh.shilimkar@oracle.com]
>> Sent: Tuesday, September 01, 2015 5:19 PM
>> To: Kwok, WingMan; robh+dt@kernel.org; pawel.moll@arm.com;
>> mark.rutland@arm.com; ijc+devicetree@hellion.org.uk; galak@codeaurora.org;
>> linux@arm.linux.org.uk; devicetree@vger.kernel.org; linux-arm-
>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; ssantosh@kernel.org
>> Cc: Karicheri, Muralidharan
>> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address translations
>> under netcp
>>
>> On 9/1/15 1:28 PM, WingMan Kwok wrote:
>>> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
>>> that are memory mapped to ranges outside that of the NetCP itself.
>>> Thus address space of a child node of the NetCP node needs to be
>>> mapped 1:1 onto the parent address space.  Hence empty ranges
>>> should be used under the NetCP node.
>>>
>>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>>> ---
>>>    arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>>>    arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>>>    arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>>>    3 files changed, 12 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
>> netcp.dtsi
>>> index b13b3c9..e103ed9 100644
>>> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
>>> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
>>> @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
>>>    	compatible = "ti,netcp-1.0";
>>>    	#address-cells = <1>;
>>>    	#size-cells = <1>;
>>> -
>>> -	/* NetCP address range */
>>> -	ranges = <0 0x24000000 0x1000000>;
>>> +	ranges;
>>>
>> What blocks are we talking here. We need to increase the
>> range if the current range isn't covering entire NETCP
>> address space. Removing range isn't a solution.
>>
>
> The Serdes.  It is a HW block inside the NetCP but its address
> space starts from 0x0232a000.  We can change the base in the
> ranges property to include the serdes.  But then offsets of
> other HW blocks that are within the NetCP address range will be
> relative to this new base and are not as documented in the HW
> user guides.
>
I suspected the same. I know back then we started with SERDES code
with NETCP but as you already know, its a separate block which
is needed for NIC card to work. Its more of phy and hence its
having different address space is not surprising.

IIRC, there was a plan to consolidate the serdes code together
since the PCIE also needs it. Irrespective of that, I suggest
you model the serdes address space in another node and fetch
it from there if that works for you. Please also add DTS
documentation if you are going ahead with that approach.

Regards,
Santosh




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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 15:50       ` santosh shilimkar
  0 siblings, 0 replies; 39+ messages in thread
From: santosh shilimkar @ 2015-09-02 15:50 UTC (permalink / raw)
  To: Kwok, WingMan, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
	galak, linux, devicetree, linux-arm-kernel, linux-kernel,
	ssantosh
  Cc: Karicheri, Muralidharan

On 9/2/2015 8:31 AM, Kwok, WingMan wrote:
>
>
>> -----Original Message-----
>> From: santosh.shilimkar@oracle.com [mailto:santosh.shilimkar@oracle.com]
>> Sent: Tuesday, September 01, 2015 5:19 PM
>> To: Kwok, WingMan; robh+dt@kernel.org; pawel.moll@arm.com;
>> mark.rutland@arm.com; ijc+devicetree@hellion.org.uk; galak@codeaurora.org;
>> linux@arm.linux.org.uk; devicetree@vger.kernel.org; linux-arm-
>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; ssantosh@kernel.org
>> Cc: Karicheri, Muralidharan
>> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address translations
>> under netcp
>>
>> On 9/1/15 1:28 PM, WingMan Kwok wrote:
>>> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
>>> that are memory mapped to ranges outside that of the NetCP itself.
>>> Thus address space of a child node of the NetCP node needs to be
>>> mapped 1:1 onto the parent address space.  Hence empty ranges
>>> should be used under the NetCP node.
>>>
>>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>>> ---
>>>    arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>>>    arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>>>    arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>>>    3 files changed, 12 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
>> netcp.dtsi
>>> index b13b3c9..e103ed9 100644
>>> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
>>> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
>>> @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
>>>    	compatible = "ti,netcp-1.0";
>>>    	#address-cells = <1>;
>>>    	#size-cells = <1>;
>>> -
>>> -	/* NetCP address range */
>>> -	ranges = <0 0x24000000 0x1000000>;
>>> +	ranges;
>>>
>> What blocks are we talking here. We need to increase the
>> range if the current range isn't covering entire NETCP
>> address space. Removing range isn't a solution.
>>
>
> The Serdes.  It is a HW block inside the NetCP but its address
> space starts from 0x0232a000.  We can change the base in the
> ranges property to include the serdes.  But then offsets of
> other HW blocks that are within the NetCP address range will be
> relative to this new base and are not as documented in the HW
> user guides.
>
I suspected the same. I know back then we started with SERDES code
with NETCP but as you already know, its a separate block which
is needed for NIC card to work. Its more of phy and hence its
having different address space is not surprising.

IIRC, there was a plan to consolidate the serdes code together
since the PCIE also needs it. Irrespective of that, I suggest
you model the serdes address space in another node and fetch
it from there if that works for you. Please also add DTS
documentation if you are going ahead with that approach.

Regards,
Santosh

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

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 15:50       ` santosh shilimkar
  0 siblings, 0 replies; 39+ messages in thread
From: santosh shilimkar @ 2015-09-02 15:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/2/2015 8:31 AM, Kwok, WingMan wrote:
>
>
>> -----Original Message-----
>> From: santosh.shilimkar at oracle.com [mailto:santosh.shilimkar at oracle.com]
>> Sent: Tuesday, September 01, 2015 5:19 PM
>> To: Kwok, WingMan; robh+dt at kernel.org; pawel.moll at arm.com;
>> mark.rutland at arm.com; ijc+devicetree at hellion.org.uk; galak at codeaurora.org;
>> linux at arm.linux.org.uk; devicetree at vger.kernel.org; linux-arm-
>> kernel at lists.infradead.org; linux-kernel at vger.kernel.org; ssantosh at kernel.org
>> Cc: Karicheri, Muralidharan
>> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address translations
>> under netcp
>>
>> On 9/1/15 1:28 PM, WingMan Kwok wrote:
>>> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
>>> that are memory mapped to ranges outside that of the NetCP itself.
>>> Thus address space of a child node of the NetCP node needs to be
>>> mapped 1:1 onto the parent address space.  Hence empty ranges
>>> should be used under the NetCP node.
>>>
>>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>>> ---
>>>    arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>>>    arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>>>    arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>>>    3 files changed, 12 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
>> netcp.dtsi
>>> index b13b3c9..e103ed9 100644
>>> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
>>> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
>>> @@ -111,9 +111,7 @@ netcp: netcp at 24000000 {
>>>    	compatible = "ti,netcp-1.0";
>>>    	#address-cells = <1>;
>>>    	#size-cells = <1>;
>>> -
>>> -	/* NetCP address range */
>>> -	ranges = <0 0x24000000 0x1000000>;
>>> +	ranges;
>>>
>> What blocks are we talking here. We need to increase the
>> range if the current range isn't covering entire NETCP
>> address space. Removing range isn't a solution.
>>
>
> The Serdes.  It is a HW block inside the NetCP but its address
> space starts from 0x0232a000.  We can change the base in the
> ranges property to include the serdes.  But then offsets of
> other HW blocks that are within the NetCP address range will be
> relative to this new base and are not as documented in the HW
> user guides.
>
I suspected the same. I know back then we started with SERDES code
with NETCP but as you already know, its a separate block which
is needed for NIC card to work. Its more of phy and hence its
having different address space is not surprising.

IIRC, there was a plan to consolidate the serdes code together
since the PCIE also needs it. Irrespective of that, I suggest
you model the serdes address space in another node and fetch
it from there if that works for you. Please also add DTS
documentation if you are going ahead with that approach.

Regards,
Santosh

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 16:35         ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-02 16:35 UTC (permalink / raw)
  To: santosh shilimkar, Kwok, WingMan, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux, devicetree,
	linux-arm-kernel, linux-kernel, ssantosh

Santosh,

On 09/02/2015 11:50 AM, santosh shilimkar wrote:
> On 9/2/2015 8:31 AM, Kwok, WingMan wrote:
>>
>>
>>> -----Original Message-----
>>> From: santosh.shilimkar@oracle.com [mailto:santosh.shilimkar@oracle.com]
>>> Sent: Tuesday, September 01, 2015 5:19 PM
>>> To: Kwok, WingMan; robh+dt@kernel.org; pawel.moll@arm.com;
>>> mark.rutland@arm.com; ijc+devicetree@hellion.org.uk;
>>> galak@codeaurora.org;
>>> linux@arm.linux.org.uk; devicetree@vger.kernel.org; linux-arm-
>>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
>>> ssantosh@kernel.org
>>> Cc: Karicheri, Muralidharan
>>> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address
>>> translations
>>> under netcp
>>>
>>> On 9/1/15 1:28 PM, WingMan Kwok wrote:
>>>> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
>>>> that are memory mapped to ranges outside that of the NetCP itself.
>>>> Thus address space of a child node of the NetCP node needs to be
>>>> mapped 1:1 onto the parent address space.  Hence empty ranges
>>>> should be used under the NetCP node.
>>>>
>>>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>>>> ---
>>>>    arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>>>>    arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>>>>    arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>>>>    3 files changed, 12 insertions(+), 18 deletions(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
>>> netcp.dtsi
>>>> index b13b3c9..e103ed9 100644
>>>> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
>>>> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
>>>> @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
>>>>        compatible = "ti,netcp-1.0";
>>>>        #address-cells = <1>;
>>>>        #size-cells = <1>;
>>>> -
>>>> -    /* NetCP address range */
>>>> -    ranges = <0 0x24000000 0x1000000>;
>>>> +    ranges;
>>>>
>>> What blocks are we talking here. We need to increase the
>>> range if the current range isn't covering entire NETCP
>>> address space. Removing range isn't a solution.
>>>
>>
>> The Serdes.  It is a HW block inside the NetCP but its address
>> space starts from 0x0232a000.  We can change the base in the
>> ranges property to include the serdes.  But then offsets of
>> other HW blocks that are within the NetCP address range will be
>> relative to this new base and are not as documented in the HW
>> user guides.
>>
> I suspected the same. I know back then we started with SERDES code
> with NETCP but as you already know, its a separate block which
> is needed for NIC card to work. Its more of phy and hence its
> having different address space is not surprising.

Using Phy interface is not acceptable to the subsystem maintainer based 
on the communication I had on this. Also the Phy here is tighly coupled 
with the hardware block it is working with. So this model is not right 
for SerDes driver as it require additional enhancements as described 
below if needs to be used.

The serdes initialization procedure requires checking the status in the 
hardware block (PCIe, 1G or 10G) and then taking corrective action. This 
means a Phy driver would require mapping of related hw address space 
(PCIe, 1G and 10G) as well which is already mapped by the hardware 
driver(PCIe, 1G and 10G). One solution is to treat this as a libray 
function that can be called from the respective hardware device driver. 
  A device node of h/w device (PCIe or 1G) in such as looks like

pcie {

	serdes@someaddress {
		reg = <address of serdes>;
	}
}

hw driver will call ks2_serdes_init(node, hw_base_address) to initialize 
the serdes. Other APIs can be added to enable/disable lane or shutdown 
etc. The libary will be added to drivers/soc/ti/ and used by various 
device drivers to initialize and use the phy. As the serdes is slightly 
integrated with the hardware block, IMO, this is a better approach than 
using the phy model. The API definitions will be added to 
include/linux/soc/ti/ folder.

The SerDes will use the firmware interface to download and configure the 
hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum 
on this and the response was that firmware interface can be used for 
this. The patch will be using the firmware interface instead of 
embedding magic values in the serdes driver.

Murali

>
> IIRC, there was a plan to consolidate the serdes code together
> since the PCIE also needs it. Irrespective of that, I suggest
> you model the serdes address space in another node and fetch
> it from there if that works for you. Please also add DTS
> documentation if you are going ahead with that approach.
>

> Regards,
> Santosh
>
>
>
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 16:35         ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-02 16:35 UTC (permalink / raw)
  To: santosh shilimkar, Kwok, WingMan, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ssantosh-DgEjT+Ai2ygdnm+yROfE0A

Santosh,

On 09/02/2015 11:50 AM, santosh shilimkar wrote:
> On 9/2/2015 8:31 AM, Kwok, WingMan wrote:
>>
>>
>>> -----Original Message-----
>>> From: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org [mailto:santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org]
>>> Sent: Tuesday, September 01, 2015 5:19 PM
>>> To: Kwok, WingMan; robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org; pawel.moll-5wv7dgnIgG8@public.gmane.org;
>>> mark.rutland-5wv7dgnIgG8@public.gmane.org; ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org;
>>> galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org;
>>> linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org; devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-arm-
>>> kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
>>> ssantosh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
>>> Cc: Karicheri, Muralidharan
>>> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address
>>> translations
>>> under netcp
>>>
>>> On 9/1/15 1:28 PM, WingMan Kwok wrote:
>>>> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
>>>> that are memory mapped to ranges outside that of the NetCP itself.
>>>> Thus address space of a child node of the NetCP node needs to be
>>>> mapped 1:1 onto the parent address space.  Hence empty ranges
>>>> should be used under the NetCP node.
>>>>
>>>> Signed-off-by: WingMan Kwok <w-kwok2-l0cyMroinI0@public.gmane.org>
>>>> ---
>>>>    arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>>>>    arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>>>>    arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>>>>    3 files changed, 12 insertions(+), 18 deletions(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
>>> netcp.dtsi
>>>> index b13b3c9..e103ed9 100644
>>>> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
>>>> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
>>>> @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
>>>>        compatible = "ti,netcp-1.0";
>>>>        #address-cells = <1>;
>>>>        #size-cells = <1>;
>>>> -
>>>> -    /* NetCP address range */
>>>> -    ranges = <0 0x24000000 0x1000000>;
>>>> +    ranges;
>>>>
>>> What blocks are we talking here. We need to increase the
>>> range if the current range isn't covering entire NETCP
>>> address space. Removing range isn't a solution.
>>>
>>
>> The Serdes.  It is a HW block inside the NetCP but its address
>> space starts from 0x0232a000.  We can change the base in the
>> ranges property to include the serdes.  But then offsets of
>> other HW blocks that are within the NetCP address range will be
>> relative to this new base and are not as documented in the HW
>> user guides.
>>
> I suspected the same. I know back then we started with SERDES code
> with NETCP but as you already know, its a separate block which
> is needed for NIC card to work. Its more of phy and hence its
> having different address space is not surprising.

Using Phy interface is not acceptable to the subsystem maintainer based 
on the communication I had on this. Also the Phy here is tighly coupled 
with the hardware block it is working with. So this model is not right 
for SerDes driver as it require additional enhancements as described 
below if needs to be used.

The serdes initialization procedure requires checking the status in the 
hardware block (PCIe, 1G or 10G) and then taking corrective action. This 
means a Phy driver would require mapping of related hw address space 
(PCIe, 1G and 10G) as well which is already mapped by the hardware 
driver(PCIe, 1G and 10G). One solution is to treat this as a libray 
function that can be called from the respective hardware device driver. 
  A device node of h/w device (PCIe or 1G) in such as looks like

pcie {

	serdes@someaddress {
		reg = <address of serdes>;
	}
}

hw driver will call ks2_serdes_init(node, hw_base_address) to initialize 
the serdes. Other APIs can be added to enable/disable lane or shutdown 
etc. The libary will be added to drivers/soc/ti/ and used by various 
device drivers to initialize and use the phy. As the serdes is slightly 
integrated with the hardware block, IMO, this is a better approach than 
using the phy model. The API definitions will be added to 
include/linux/soc/ti/ folder.

The SerDes will use the firmware interface to download and configure the 
hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum 
on this and the response was that firmware interface can be used for 
this. The patch will be using the firmware interface instead of 
embedding magic values in the serdes driver.

Murali

>
> IIRC, there was a plan to consolidate the serdes code together
> since the PCIE also needs it. Irrespective of that, I suggest
> you model the serdes address space in another node and fetch
> it from there if that works for you. Please also add DTS
> documentation if you are going ahead with that approach.
>

> Regards,
> Santosh
>
>
>
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone
--
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] 39+ messages in thread

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 16:35         ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-02 16:35 UTC (permalink / raw)
  To: linux-arm-kernel

Santosh,

On 09/02/2015 11:50 AM, santosh shilimkar wrote:
> On 9/2/2015 8:31 AM, Kwok, WingMan wrote:
>>
>>
>>> -----Original Message-----
>>> From: santosh.shilimkar at oracle.com [mailto:santosh.shilimkar at oracle.com]
>>> Sent: Tuesday, September 01, 2015 5:19 PM
>>> To: Kwok, WingMan; robh+dt at kernel.org; pawel.moll at arm.com;
>>> mark.rutland at arm.com; ijc+devicetree at hellion.org.uk;
>>> galak at codeaurora.org;
>>> linux at arm.linux.org.uk; devicetree at vger.kernel.org; linux-arm-
>>> kernel at lists.infradead.org; linux-kernel at vger.kernel.org;
>>> ssantosh at kernel.org
>>> Cc: Karicheri, Muralidharan
>>> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address
>>> translations
>>> under netcp
>>>
>>> On 9/1/15 1:28 PM, WingMan Kwok wrote:
>>>> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
>>>> that are memory mapped to ranges outside that of the NetCP itself.
>>>> Thus address space of a child node of the NetCP node needs to be
>>>> mapped 1:1 onto the parent address space.  Hence empty ranges
>>>> should be used under the NetCP node.
>>>>
>>>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>>>> ---
>>>>    arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>>>>    arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>>>>    arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>>>>    3 files changed, 12 insertions(+), 18 deletions(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
>>> netcp.dtsi
>>>> index b13b3c9..e103ed9 100644
>>>> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
>>>> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
>>>> @@ -111,9 +111,7 @@ netcp: netcp at 24000000 {
>>>>        compatible = "ti,netcp-1.0";
>>>>        #address-cells = <1>;
>>>>        #size-cells = <1>;
>>>> -
>>>> -    /* NetCP address range */
>>>> -    ranges = <0 0x24000000 0x1000000>;
>>>> +    ranges;
>>>>
>>> What blocks are we talking here. We need to increase the
>>> range if the current range isn't covering entire NETCP
>>> address space. Removing range isn't a solution.
>>>
>>
>> The Serdes.  It is a HW block inside the NetCP but its address
>> space starts from 0x0232a000.  We can change the base in the
>> ranges property to include the serdes.  But then offsets of
>> other HW blocks that are within the NetCP address range will be
>> relative to this new base and are not as documented in the HW
>> user guides.
>>
> I suspected the same. I know back then we started with SERDES code
> with NETCP but as you already know, its a separate block which
> is needed for NIC card to work. Its more of phy and hence its
> having different address space is not surprising.

Using Phy interface is not acceptable to the subsystem maintainer based 
on the communication I had on this. Also the Phy here is tighly coupled 
with the hardware block it is working with. So this model is not right 
for SerDes driver as it require additional enhancements as described 
below if needs to be used.

The serdes initialization procedure requires checking the status in the 
hardware block (PCIe, 1G or 10G) and then taking corrective action. This 
means a Phy driver would require mapping of related hw address space 
(PCIe, 1G and 10G) as well which is already mapped by the hardware 
driver(PCIe, 1G and 10G). One solution is to treat this as a libray 
function that can be called from the respective hardware device driver. 
  A device node of h/w device (PCIe or 1G) in such as looks like

pcie {

	serdes at someaddress {
		reg = <address of serdes>;
	}
}

hw driver will call ks2_serdes_init(node, hw_base_address) to initialize 
the serdes. Other APIs can be added to enable/disable lane or shutdown 
etc. The libary will be added to drivers/soc/ti/ and used by various 
device drivers to initialize and use the phy. As the serdes is slightly 
integrated with the hardware block, IMO, this is a better approach than 
using the phy model. The API definitions will be added to 
include/linux/soc/ti/ folder.

The SerDes will use the firmware interface to download and configure the 
hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum 
on this and the response was that firmware interface can be used for 
this. The patch will be using the firmware interface instead of 
embedding magic values in the serdes driver.

Murali

>
> IIRC, there was a plan to consolidate the serdes code together
> since the PCIE also needs it. Irrespective of that, I suggest
> you model the serdes address space in another node and fetch
> it from there if that works for you. Please also add DTS
> documentation if you are going ahead with that approach.
>

> Regards,
> Santosh
>
>
>
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
  2015-09-02 16:35         ` Murali Karicheri
  (?)
@ 2015-09-02 17:24           ` santosh shilimkar
  -1 siblings, 0 replies; 39+ messages in thread
From: santosh shilimkar @ 2015-09-02 17:24 UTC (permalink / raw)
  To: Murali Karicheri, Kwok, WingMan, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux, devicetree,
	linux-arm-kernel, linux-kernel, ssantosh

On 9/2/2015 9:35 AM, Murali Karicheri wrote:
> Santosh,
>
> On 09/02/2015 11:50 AM, santosh shilimkar wrote:
>> On 9/2/2015 8:31 AM, Kwok, WingMan wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: santosh.shilimkar@oracle.com
>>>> [mailto:santosh.shilimkar@oracle.com]
>>>> Sent: Tuesday, September 01, 2015 5:19 PM
>>>> To: Kwok, WingMan; robh+dt@kernel.org; pawel.moll@arm.com;
>>>> mark.rutland@arm.com; ijc+devicetree@hellion.org.uk;
>>>> galak@codeaurora.org;
>>>> linux@arm.linux.org.uk; devicetree@vger.kernel.org; linux-arm-
>>>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
>>>> ssantosh@kernel.org
>>>> Cc: Karicheri, Muralidharan
>>>> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address
>>>> translations
>>>> under netcp
>>>>
>>>> On 9/1/15 1:28 PM, WingMan Kwok wrote:
>>>>> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
>>>>> that are memory mapped to ranges outside that of the NetCP itself.
>>>>> Thus address space of a child node of the NetCP node needs to be
>>>>> mapped 1:1 onto the parent address space.  Hence empty ranges
>>>>> should be used under the NetCP node.
>>>>>
>>>>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>>>>> ---
>>>>>    arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>>>>>    arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>>>>>    arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>>>>>    3 files changed, 12 insertions(+), 18 deletions(-)
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
>>>> netcp.dtsi
>>>>> index b13b3c9..e103ed9 100644
>>>>> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
>>>>> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
>>>>> @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
>>>>>        compatible = "ti,netcp-1.0";
>>>>>        #address-cells = <1>;
>>>>>        #size-cells = <1>;
>>>>> -
>>>>> -    /* NetCP address range */
>>>>> -    ranges = <0 0x24000000 0x1000000>;
>>>>> +    ranges;
>>>>>
>>>> What blocks are we talking here. We need to increase the
>>>> range if the current range isn't covering entire NETCP
>>>> address space. Removing range isn't a solution.
>>>>
>>>
>>> The Serdes.  It is a HW block inside the NetCP but its address
>>> space starts from 0x0232a000.  We can change the base in the
>>> ranges property to include the serdes.  But then offsets of
>>> other HW blocks that are within the NetCP address range will be
>>> relative to this new base and are not as documented in the HW
>>> user guides.
>>>
>> I suspected the same. I know back then we started with SERDES code
>> with NETCP but as you already know, its a separate block which
>> is needed for NIC card to work. Its more of phy and hence its
>> having different address space is not surprising.
>
> Using Phy interface is not acceptable to the subsystem maintainer based
> on the communication I had on this. Also the Phy here is tighly coupled
> with the hardware block it is working with. So this model is not right
> for SerDes driver as it require additional enhancements as described
> below if needs to be used.
>
Thanks for update on that.

> The serdes initialization procedure requires checking the status in the
> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
> means a Phy driver would require mapping of related hw address space
> (PCIe, 1G and 10G) as well which is already mapped by the hardware
> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
> function that can be called from the respective hardware device driver.
>   A device node of h/w device (PCIe or 1G) in such as looks like
>
Or SerDes driver can embed the status reg address space.
This is read only access so should be fine.

> pcie {
>
>      serdes@someaddress {
>          reg = <address of serdes>;
>      }
> }
>
> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
> the serdes. Other APIs can be added to enable/disable lane or shutdown
> etc. The libary will be added to drivers/soc/ti/ and used by various
> device drivers to initialize and use the phy. As the serdes is slightly
> integrated with the hardware block, IMO, this is a better approach than
> using the phy model. The API definitions will be added to
> include/linux/soc/ti/ folder.
>
Serdes Driver with its status register address space might solve this
sharing problem. Library might work but we should try to have driver
considering there is a physical device. I don't have strong opinion
on drivers vs library.


> The SerDes will use the firmware interface to download and configure the
> hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum
> on this and the response was that firmware interface can be used for
> this. The patch will be using the firmware interface instead of
> embedding magic values in the serdes driver.
>
Firmware interface usage seems to be correct way.
Thanks for giving the details. It helped me to get better picture.

Regards,
Santosh

Regards,
Santosh

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 17:24           ` santosh shilimkar
  0 siblings, 0 replies; 39+ messages in thread
From: santosh shilimkar @ 2015-09-02 17:24 UTC (permalink / raw)
  To: Murali Karicheri, Kwok, WingMan, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux, devicetree,
	linux-arm-kernel, linux-kernel, ssantosh

On 9/2/2015 9:35 AM, Murali Karicheri wrote:
> Santosh,
>
> On 09/02/2015 11:50 AM, santosh shilimkar wrote:
>> On 9/2/2015 8:31 AM, Kwok, WingMan wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: santosh.shilimkar@oracle.com
>>>> [mailto:santosh.shilimkar@oracle.com]
>>>> Sent: Tuesday, September 01, 2015 5:19 PM
>>>> To: Kwok, WingMan; robh+dt@kernel.org; pawel.moll@arm.com;
>>>> mark.rutland@arm.com; ijc+devicetree@hellion.org.uk;
>>>> galak@codeaurora.org;
>>>> linux@arm.linux.org.uk; devicetree@vger.kernel.org; linux-arm-
>>>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
>>>> ssantosh@kernel.org
>>>> Cc: Karicheri, Muralidharan
>>>> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address
>>>> translations
>>>> under netcp
>>>>
>>>> On 9/1/15 1:28 PM, WingMan Kwok wrote:
>>>>> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
>>>>> that are memory mapped to ranges outside that of the NetCP itself.
>>>>> Thus address space of a child node of the NetCP node needs to be
>>>>> mapped 1:1 onto the parent address space.  Hence empty ranges
>>>>> should be used under the NetCP node.
>>>>>
>>>>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>>>>> ---
>>>>>    arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>>>>>    arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>>>>>    arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>>>>>    3 files changed, 12 insertions(+), 18 deletions(-)
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
>>>> netcp.dtsi
>>>>> index b13b3c9..e103ed9 100644
>>>>> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
>>>>> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
>>>>> @@ -111,9 +111,7 @@ netcp: netcp@24000000 {
>>>>>        compatible = "ti,netcp-1.0";
>>>>>        #address-cells = <1>;
>>>>>        #size-cells = <1>;
>>>>> -
>>>>> -    /* NetCP address range */
>>>>> -    ranges = <0 0x24000000 0x1000000>;
>>>>> +    ranges;
>>>>>
>>>> What blocks are we talking here. We need to increase the
>>>> range if the current range isn't covering entire NETCP
>>>> address space. Removing range isn't a solution.
>>>>
>>>
>>> The Serdes.  It is a HW block inside the NetCP but its address
>>> space starts from 0x0232a000.  We can change the base in the
>>> ranges property to include the serdes.  But then offsets of
>>> other HW blocks that are within the NetCP address range will be
>>> relative to this new base and are not as documented in the HW
>>> user guides.
>>>
>> I suspected the same. I know back then we started with SERDES code
>> with NETCP but as you already know, its a separate block which
>> is needed for NIC card to work. Its more of phy and hence its
>> having different address space is not surprising.
>
> Using Phy interface is not acceptable to the subsystem maintainer based
> on the communication I had on this. Also the Phy here is tighly coupled
> with the hardware block it is working with. So this model is not right
> for SerDes driver as it require additional enhancements as described
> below if needs to be used.
>
Thanks for update on that.

> The serdes initialization procedure requires checking the status in the
> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
> means a Phy driver would require mapping of related hw address space
> (PCIe, 1G and 10G) as well which is already mapped by the hardware
> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
> function that can be called from the respective hardware device driver.
>   A device node of h/w device (PCIe or 1G) in such as looks like
>
Or SerDes driver can embed the status reg address space.
This is read only access so should be fine.

> pcie {
>
>      serdes@someaddress {
>          reg = <address of serdes>;
>      }
> }
>
> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
> the serdes. Other APIs can be added to enable/disable lane or shutdown
> etc. The libary will be added to drivers/soc/ti/ and used by various
> device drivers to initialize and use the phy. As the serdes is slightly
> integrated with the hardware block, IMO, this is a better approach than
> using the phy model. The API definitions will be added to
> include/linux/soc/ti/ folder.
>
Serdes Driver with its status register address space might solve this
sharing problem. Library might work but we should try to have driver
considering there is a physical device. I don't have strong opinion
on drivers vs library.


> The SerDes will use the firmware interface to download and configure the
> hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum
> on this and the response was that firmware interface can be used for
> this. The patch will be using the firmware interface instead of
> embedding magic values in the serdes driver.
>
Firmware interface usage seems to be correct way.
Thanks for giving the details. It helped me to get better picture.

Regards,
Santosh

Regards,
Santosh

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

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 17:24           ` santosh shilimkar
  0 siblings, 0 replies; 39+ messages in thread
From: santosh shilimkar @ 2015-09-02 17:24 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/2/2015 9:35 AM, Murali Karicheri wrote:
> Santosh,
>
> On 09/02/2015 11:50 AM, santosh shilimkar wrote:
>> On 9/2/2015 8:31 AM, Kwok, WingMan wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: santosh.shilimkar at oracle.com
>>>> [mailto:santosh.shilimkar at oracle.com]
>>>> Sent: Tuesday, September 01, 2015 5:19 PM
>>>> To: Kwok, WingMan; robh+dt at kernel.org; pawel.moll at arm.com;
>>>> mark.rutland at arm.com; ijc+devicetree at hellion.org.uk;
>>>> galak at codeaurora.org;
>>>> linux at arm.linux.org.uk; devicetree at vger.kernel.org; linux-arm-
>>>> kernel at lists.infradead.org; linux-kernel at vger.kernel.org;
>>>> ssantosh at kernel.org
>>>> Cc: Karicheri, Muralidharan
>>>> Subject: Re: [PATCH] ARM: dts: keystone: use one to one address
>>>> translations
>>>> under netcp
>>>>
>>>> On 9/1/15 1:28 PM, WingMan Kwok wrote:
>>>>> Network subsystem NetCP in Keystone-2 devices includes some HW blocks
>>>>> that are memory mapped to ranges outside that of the NetCP itself.
>>>>> Thus address space of a child node of the NetCP node needs to be
>>>>> mapped 1:1 onto the parent address space.  Hence empty ranges
>>>>> should be used under the NetCP node.
>>>>>
>>>>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>>>>> ---
>>>>>    arch/arm/boot/dts/k2e-netcp.dtsi  |    8 +++-----
>>>>>    arch/arm/boot/dts/k2hk-netcp.dtsi |   14 ++++++--------
>>>>>    arch/arm/boot/dts/k2l-netcp.dtsi  |    8 +++-----
>>>>>    3 files changed, 12 insertions(+), 18 deletions(-)
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/k2e-netcp.dtsi b/arch/arm/boot/dts/k2e-
>>>> netcp.dtsi
>>>>> index b13b3c9..e103ed9 100644
>>>>> --- a/arch/arm/boot/dts/k2e-netcp.dtsi
>>>>> +++ b/arch/arm/boot/dts/k2e-netcp.dtsi
>>>>> @@ -111,9 +111,7 @@ netcp: netcp at 24000000 {
>>>>>        compatible = "ti,netcp-1.0";
>>>>>        #address-cells = <1>;
>>>>>        #size-cells = <1>;
>>>>> -
>>>>> -    /* NetCP address range */
>>>>> -    ranges = <0 0x24000000 0x1000000>;
>>>>> +    ranges;
>>>>>
>>>> What blocks are we talking here. We need to increase the
>>>> range if the current range isn't covering entire NETCP
>>>> address space. Removing range isn't a solution.
>>>>
>>>
>>> The Serdes.  It is a HW block inside the NetCP but its address
>>> space starts from 0x0232a000.  We can change the base in the
>>> ranges property to include the serdes.  But then offsets of
>>> other HW blocks that are within the NetCP address range will be
>>> relative to this new base and are not as documented in the HW
>>> user guides.
>>>
>> I suspected the same. I know back then we started with SERDES code
>> with NETCP but as you already know, its a separate block which
>> is needed for NIC card to work. Its more of phy and hence its
>> having different address space is not surprising.
>
> Using Phy interface is not acceptable to the subsystem maintainer based
> on the communication I had on this. Also the Phy here is tighly coupled
> with the hardware block it is working with. So this model is not right
> for SerDes driver as it require additional enhancements as described
> below if needs to be used.
>
Thanks for update on that.

> The serdes initialization procedure requires checking the status in the
> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
> means a Phy driver would require mapping of related hw address space
> (PCIe, 1G and 10G) as well which is already mapped by the hardware
> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
> function that can be called from the respective hardware device driver.
>   A device node of h/w device (PCIe or 1G) in such as looks like
>
Or SerDes driver can embed the status reg address space.
This is read only access so should be fine.

> pcie {
>
>      serdes at someaddress {
>          reg = <address of serdes>;
>      }
> }
>
> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
> the serdes. Other APIs can be added to enable/disable lane or shutdown
> etc. The libary will be added to drivers/soc/ti/ and used by various
> device drivers to initialize and use the phy. As the serdes is slightly
> integrated with the hardware block, IMO, this is a better approach than
> using the phy model. The API definitions will be added to
> include/linux/soc/ti/ folder.
>
Serdes Driver with its status register address space might solve this
sharing problem. Library might work but we should try to have driver
considering there is a physical device. I don't have strong opinion
on drivers vs library.


> The SerDes will use the firmware interface to download and configure the
> hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum
> on this and the response was that firmware interface can be used for
> this. The patch will be using the firmware interface instead of
> embedding magic values in the serdes driver.
>
Firmware interface usage seems to be correct way.
Thanks for giving the details. It helped me to get better picture.

Regards,
Santosh

Regards,
Santosh

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 17:58             ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-02 17:58 UTC (permalink / raw)
  To: santosh shilimkar, Kwok, WingMan, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux, devicetree,
	linux-arm-kernel, linux-kernel, ssantosh

On 09/02/2015 01:24 PM, santosh shilimkar wrote:
> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>> Santosh,
>>

---Cut-------------------

>>> I suspected the same. I know back then we started with SERDES code
>>> with NETCP but as you already know, its a separate block which
>>> is needed for NIC card to work. Its more of phy and hence its
>>> having different address space is not surprising.
>>
>> Using Phy interface is not acceptable to the subsystem maintainer based
>> on the communication I had on this. Also the Phy here is tighly coupled
>> with the hardware block it is working with. So this model is not right
>> for SerDes driver as it require additional enhancements as described
>> below if needs to be used.
>>
> Thanks for update on that.
>
>> The serdes initialization procedure requires checking the status in the
>> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
>> means a Phy driver would require mapping of related hw address space
>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>> function that can be called from the respective hardware device driver.
>>   A device node of h/w device (PCIe or 1G) in such as looks like
>>
> Or SerDes driver can embed the status reg address space.
> This is read only access so should be fine.
>
>> pcie {
>>
>>      serdes@someaddress {
>>          reg = <address of serdes>;
>>      }
>> }
>>
>> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>> etc. The libary will be added to drivers/soc/ti/ and used by various
>> device drivers to initialize and use the phy. As the serdes is slightly
>> integrated with the hardware block, IMO, this is a better approach than
>> using the phy model. The API definitions will be added to
>> include/linux/soc/ti/ folder.
>>
> Serdes Driver with its status register address space might solve this
> sharing problem. Library might work but we should try to have driver
> considering there is a physical device. I don't have strong opinion
> on drivers vs library.
>

In addition to checking status in the SerDes, it needs to also check the 
status of the associated hardware block (PCIe, 1G, 10G etc). So this 
means, same needs to be mapped twice, first by the above hardware device 
drivers and then by the serdes driver which causes problem. My point is 
since they both are tightly coupled, a libary is a better option. That 
way the mapped address can be passed to the serdes API to perform the 
required task, instead of using Phy API which doesn't allow us to do the 
same. If SerDes h/w can be brought up independently, the Phy model fits 
well.

Murali
>
>> The SerDes will use the firmware interface to download and configure the
>> hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum
>> on this and the response was that firmware interface can be used for
>> this. The patch will be using the firmware interface instead of
>> embedding magic values in the serdes driver.
>>
> Firmware interface usage seems to be correct way.
> Thanks for giving the details. It helped me to get better picture.
>
> Regards,
> Santosh
>
> Regards,
> Santosh
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 17:58             ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-02 17:58 UTC (permalink / raw)
  To: santosh shilimkar, Kwok, WingMan, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ssantosh-DgEjT+Ai2ygdnm+yROfE0A

On 09/02/2015 01:24 PM, santosh shilimkar wrote:
> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>> Santosh,
>>

---Cut-------------------

>>> I suspected the same. I know back then we started with SERDES code
>>> with NETCP but as you already know, its a separate block which
>>> is needed for NIC card to work. Its more of phy and hence its
>>> having different address space is not surprising.
>>
>> Using Phy interface is not acceptable to the subsystem maintainer based
>> on the communication I had on this. Also the Phy here is tighly coupled
>> with the hardware block it is working with. So this model is not right
>> for SerDes driver as it require additional enhancements as described
>> below if needs to be used.
>>
> Thanks for update on that.
>
>> The serdes initialization procedure requires checking the status in the
>> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
>> means a Phy driver would require mapping of related hw address space
>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>> function that can be called from the respective hardware device driver.
>>   A device node of h/w device (PCIe or 1G) in such as looks like
>>
> Or SerDes driver can embed the status reg address space.
> This is read only access so should be fine.
>
>> pcie {
>>
>>      serdes@someaddress {
>>          reg = <address of serdes>;
>>      }
>> }
>>
>> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>> etc. The libary will be added to drivers/soc/ti/ and used by various
>> device drivers to initialize and use the phy. As the serdes is slightly
>> integrated with the hardware block, IMO, this is a better approach than
>> using the phy model. The API definitions will be added to
>> include/linux/soc/ti/ folder.
>>
> Serdes Driver with its status register address space might solve this
> sharing problem. Library might work but we should try to have driver
> considering there is a physical device. I don't have strong opinion
> on drivers vs library.
>

In addition to checking status in the SerDes, it needs to also check the 
status of the associated hardware block (PCIe, 1G, 10G etc). So this 
means, same needs to be mapped twice, first by the above hardware device 
drivers and then by the serdes driver which causes problem. My point is 
since they both are tightly coupled, a libary is a better option. That 
way the mapped address can be passed to the serdes API to perform the 
required task, instead of using Phy API which doesn't allow us to do the 
same. If SerDes h/w can be brought up independently, the Phy model fits 
well.

Murali
>
>> The SerDes will use the firmware interface to download and configure the
>> hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum
>> on this and the response was that firmware interface can be used for
>> this. The patch will be using the firmware interface instead of
>> embedding magic values in the serdes driver.
>>
> Firmware interface usage seems to be correct way.
> Thanks for giving the details. It helped me to get better picture.
>
> Regards,
> Santosh
>
> Regards,
> Santosh
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone
--
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] 39+ messages in thread

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 17:58             ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-02 17:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/02/2015 01:24 PM, santosh shilimkar wrote:
> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>> Santosh,
>>

---Cut-------------------

>>> I suspected the same. I know back then we started with SERDES code
>>> with NETCP but as you already know, its a separate block which
>>> is needed for NIC card to work. Its more of phy and hence its
>>> having different address space is not surprising.
>>
>> Using Phy interface is not acceptable to the subsystem maintainer based
>> on the communication I had on this. Also the Phy here is tighly coupled
>> with the hardware block it is working with. So this model is not right
>> for SerDes driver as it require additional enhancements as described
>> below if needs to be used.
>>
> Thanks for update on that.
>
>> The serdes initialization procedure requires checking the status in the
>> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
>> means a Phy driver would require mapping of related hw address space
>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>> function that can be called from the respective hardware device driver.
>>   A device node of h/w device (PCIe or 1G) in such as looks like
>>
> Or SerDes driver can embed the status reg address space.
> This is read only access so should be fine.
>
>> pcie {
>>
>>      serdes at someaddress {
>>          reg = <address of serdes>;
>>      }
>> }
>>
>> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>> etc. The libary will be added to drivers/soc/ti/ and used by various
>> device drivers to initialize and use the phy. As the serdes is slightly
>> integrated with the hardware block, IMO, this is a better approach than
>> using the phy model. The API definitions will be added to
>> include/linux/soc/ti/ folder.
>>
> Serdes Driver with its status register address space might solve this
> sharing problem. Library might work but we should try to have driver
> considering there is a physical device. I don't have strong opinion
> on drivers vs library.
>

In addition to checking status in the SerDes, it needs to also check the 
status of the associated hardware block (PCIe, 1G, 10G etc). So this 
means, same needs to be mapped twice, first by the above hardware device 
drivers and then by the serdes driver which causes problem. My point is 
since they both are tightly coupled, a libary is a better option. That 
way the mapped address can be passed to the serdes API to perform the 
required task, instead of using Phy API which doesn't allow us to do the 
same. If SerDes h/w can be brought up independently, the Phy model fits 
well.

Murali
>
>> The SerDes will use the firmware interface to download and configure the
>> hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum
>> on this and the response was that firmware interface can be used for
>> this. The patch will be using the firmware interface instead of
>> embedding magic values in the serdes driver.
>>
> Firmware interface usage seems to be correct way.
> Thanks for giving the details. It helped me to get better picture.
>
> Regards,
> Santosh
>
> Regards,
> Santosh
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 18:25               ` santosh shilimkar
  0 siblings, 0 replies; 39+ messages in thread
From: santosh shilimkar @ 2015-09-02 18:25 UTC (permalink / raw)
  To: Murali Karicheri, Kwok, WingMan, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux, devicetree,
	linux-arm-kernel, linux-kernel, ssantosh

9/2/2015 10:58 AM, Murali Karicheri wrote:
> On 09/02/2015 01:24 PM, santosh shilimkar wrote:
>> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>>> Santosh,
>>>
>
> ---Cut-------------------
>
>>>> I suspected the same. I know back then we started with SERDES code
>>>> with NETCP but as you already know, its a separate block which
>>>> is needed for NIC card to work. Its more of phy and hence its
>>>> having different address space is not surprising.
>>>
>>> Using Phy interface is not acceptable to the subsystem maintainer based
>>> on the communication I had on this. Also the Phy here is tighly coupled
>>> with the hardware block it is working with. So this model is not right
>>> for SerDes driver as it require additional enhancements as described
>>> below if needs to be used.
>>>
>> Thanks for update on that.
>>
>>> The serdes initialization procedure requires checking the status in the
>>> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
>>> means a Phy driver would require mapping of related hw address space
>>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>>> function that can be called from the respective hardware device driver.
>>>   A device node of h/w device (PCIe or 1G) in such as looks like
>>>
>> Or SerDes driver can embed the status reg address space.
>> This is read only access so should be fine.
>>
>>> pcie {
>>>
>>>      serdes@someaddress {
>>>          reg = <address of serdes>;
>>>      }
>>> }
>>>
>>> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
>>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>>> etc. The libary will be added to drivers/soc/ti/ and used by various
>>> device drivers to initialize and use the phy. As the serdes is slightly
>>> integrated with the hardware block, IMO, this is a better approach than
>>> using the phy model. The API definitions will be added to
>>> include/linux/soc/ti/ folder.
>>>
>> Serdes Driver with its status register address space might solve this
>> sharing problem. Library might work but we should try to have driver
>> considering there is a physical device. I don't have strong opinion
>> on drivers vs library.
>>
>
> In addition to checking status in the SerDes, it needs to also check the
> status of the associated hardware block (PCIe, 1G, 10G etc). So this
> means, same needs to be mapped twice, first by the above hardware device
> drivers and then by the serdes driver which causes problem. My point is
> since they both are tightly coupled, a libary is a better option. That
> way the mapped address can be passed to the serdes API to perform the
> required task, instead of using Phy API which doesn't allow us to do the
> same. If SerDes h/w can be brought up independently, the Phy model fits
> well.
>
As I said, I don't have strong preference and fine with library approach.
I suggest you do a RFC to take this further. Include Arnd on CC for
that.

Regards,
Santosh



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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 18:25               ` santosh shilimkar
  0 siblings, 0 replies; 39+ messages in thread
From: santosh shilimkar @ 2015-09-02 18:25 UTC (permalink / raw)
  To: Murali Karicheri, Kwok, WingMan, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ssantosh-DgEjT+Ai2ygdnm+yROfE0A

9/2/2015 10:58 AM, Murali Karicheri wrote:
> On 09/02/2015 01:24 PM, santosh shilimkar wrote:
>> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>>> Santosh,
>>>
>
> ---Cut-------------------
>
>>>> I suspected the same. I know back then we started with SERDES code
>>>> with NETCP but as you already know, its a separate block which
>>>> is needed for NIC card to work. Its more of phy and hence its
>>>> having different address space is not surprising.
>>>
>>> Using Phy interface is not acceptable to the subsystem maintainer based
>>> on the communication I had on this. Also the Phy here is tighly coupled
>>> with the hardware block it is working with. So this model is not right
>>> for SerDes driver as it require additional enhancements as described
>>> below if needs to be used.
>>>
>> Thanks for update on that.
>>
>>> The serdes initialization procedure requires checking the status in the
>>> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
>>> means a Phy driver would require mapping of related hw address space
>>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>>> function that can be called from the respective hardware device driver.
>>>   A device node of h/w device (PCIe or 1G) in such as looks like
>>>
>> Or SerDes driver can embed the status reg address space.
>> This is read only access so should be fine.
>>
>>> pcie {
>>>
>>>      serdes@someaddress {
>>>          reg = <address of serdes>;
>>>      }
>>> }
>>>
>>> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
>>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>>> etc. The libary will be added to drivers/soc/ti/ and used by various
>>> device drivers to initialize and use the phy. As the serdes is slightly
>>> integrated with the hardware block, IMO, this is a better approach than
>>> using the phy model. The API definitions will be added to
>>> include/linux/soc/ti/ folder.
>>>
>> Serdes Driver with its status register address space might solve this
>> sharing problem. Library might work but we should try to have driver
>> considering there is a physical device. I don't have strong opinion
>> on drivers vs library.
>>
>
> In addition to checking status in the SerDes, it needs to also check the
> status of the associated hardware block (PCIe, 1G, 10G etc). So this
> means, same needs to be mapped twice, first by the above hardware device
> drivers and then by the serdes driver which causes problem. My point is
> since they both are tightly coupled, a libary is a better option. That
> way the mapped address can be passed to the serdes API to perform the
> required task, instead of using Phy API which doesn't allow us to do the
> same. If SerDes h/w can be brought up independently, the Phy model fits
> well.
>
As I said, I don't have strong preference and fine with library approach.
I suggest you do a RFC to take this further. Include Arnd on CC for
that.

Regards,
Santosh


--
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] 39+ messages in thread

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 18:25               ` santosh shilimkar
  0 siblings, 0 replies; 39+ messages in thread
From: santosh shilimkar @ 2015-09-02 18:25 UTC (permalink / raw)
  To: linux-arm-kernel

9/2/2015 10:58 AM, Murali Karicheri wrote:
> On 09/02/2015 01:24 PM, santosh shilimkar wrote:
>> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>>> Santosh,
>>>
>
> ---Cut-------------------
>
>>>> I suspected the same. I know back then we started with SERDES code
>>>> with NETCP but as you already know, its a separate block which
>>>> is needed for NIC card to work. Its more of phy and hence its
>>>> having different address space is not surprising.
>>>
>>> Using Phy interface is not acceptable to the subsystem maintainer based
>>> on the communication I had on this. Also the Phy here is tighly coupled
>>> with the hardware block it is working with. So this model is not right
>>> for SerDes driver as it require additional enhancements as described
>>> below if needs to be used.
>>>
>> Thanks for update on that.
>>
>>> The serdes initialization procedure requires checking the status in the
>>> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
>>> means a Phy driver would require mapping of related hw address space
>>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>>> function that can be called from the respective hardware device driver.
>>>   A device node of h/w device (PCIe or 1G) in such as looks like
>>>
>> Or SerDes driver can embed the status reg address space.
>> This is read only access so should be fine.
>>
>>> pcie {
>>>
>>>      serdes at someaddress {
>>>          reg = <address of serdes>;
>>>      }
>>> }
>>>
>>> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
>>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>>> etc. The libary will be added to drivers/soc/ti/ and used by various
>>> device drivers to initialize and use the phy. As the serdes is slightly
>>> integrated with the hardware block, IMO, this is a better approach than
>>> using the phy model. The API definitions will be added to
>>> include/linux/soc/ti/ folder.
>>>
>> Serdes Driver with its status register address space might solve this
>> sharing problem. Library might work but we should try to have driver
>> considering there is a physical device. I don't have strong opinion
>> on drivers vs library.
>>
>
> In addition to checking status in the SerDes, it needs to also check the
> status of the associated hardware block (PCIe, 1G, 10G etc). So this
> means, same needs to be mapped twice, first by the above hardware device
> drivers and then by the serdes driver which causes problem. My point is
> since they both are tightly coupled, a libary is a better option. That
> way the mapped address can be passed to the serdes API to perform the
> required task, instead of using Phy API which doesn't allow us to do the
> same. If SerDes h/w can be brought up independently, the Phy model fits
> well.
>
As I said, I don't have strong preference and fine with library approach.
I suggest you do a RFC to take this further. Include Arnd on CC for
that.

Regards,
Santosh

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
  2015-09-02 18:25               ` santosh shilimkar
  (?)
@ 2015-09-02 18:42                 ` Murali Karicheri
  -1 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-02 18:42 UTC (permalink / raw)
  To: santosh shilimkar, Kwok, WingMan, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux, devicetree,
	linux-arm-kernel, linux-kernel, ssantosh

On 09/02/2015 02:25 PM, santosh shilimkar wrote:
> 9/2/2015 10:58 AM, Murali Karicheri wrote:
>> On 09/02/2015 01:24 PM, santosh shilimkar wrote:
>>> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>>>> Santosh,
>>>>
>>
>> ---Cut-------------------
>>
>>>>> I suspected the same. I know back then we started with SERDES code
>>>>> with NETCP but as you already know, its a separate block which
>>>>> is needed for NIC card to work. Its more of phy and hence its
>>>>> having different address space is not surprising.
>>>>
>>>> Using Phy interface is not acceptable to the subsystem maintainer based
>>>> on the communication I had on this. Also the Phy here is tighly coupled
>>>> with the hardware block it is working with. So this model is not right
>>>> for SerDes driver as it require additional enhancements as described
>>>> below if needs to be used.
>>>>
>>> Thanks for update on that.
>>>
>>>> The serdes initialization procedure requires checking the status in the
>>>> hardware block (PCIe, 1G or 10G) and then taking corrective action.
>>>> This
>>>> means a Phy driver would require mapping of related hw address space
>>>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>>>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>>>> function that can be called from the respective hardware device driver.
>>>>   A device node of h/w device (PCIe or 1G) in such as looks like
>>>>
>>> Or SerDes driver can embed the status reg address space.
>>> This is read only access so should be fine.
>>>
>>>> pcie {
>>>>
>>>>      serdes@someaddress {
>>>>          reg = <address of serdes>;
>>>>      }
>>>> }
>>>>
>>>> hw driver will call ks2_serdes_init(node, hw_base_address) to
>>>> initialize
>>>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>>>> etc. The libary will be added to drivers/soc/ti/ and used by various
>>>> device drivers to initialize and use the phy. As the serdes is slightly
>>>> integrated with the hardware block, IMO, this is a better approach than
>>>> using the phy model. The API definitions will be added to
>>>> include/linux/soc/ti/ folder.
>>>>
>>> Serdes Driver with its status register address space might solve this
>>> sharing problem. Library might work but we should try to have driver
>>> considering there is a physical device. I don't have strong opinion
>>> on drivers vs library.
>>>
>>
>> In addition to checking status in the SerDes, it needs to also check the
>> status of the associated hardware block (PCIe, 1G, 10G etc). So this
>> means, same needs to be mapped twice, first by the above hardware device
>> drivers and then by the serdes driver which causes problem. My point is
>> since they both are tightly coupled, a libary is a better option. That
>> way the mapped address can be passed to the serdes API to perform the
>> required task, instead of using Phy API which doesn't allow us to do the
>> same. If SerDes h/w can be brought up independently, the Phy model fits
>> well.
>>
> As I said, I don't have strong preference and fine with library approach.
> I suggest you do a RFC to take this further. Include Arnd on CC for
> that.

Sure!

Murali
>
> Regards,
> Santosh
>
>
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 18:42                 ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-02 18:42 UTC (permalink / raw)
  To: santosh shilimkar, Kwok, WingMan, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux, devicetree,
	linux-arm-kernel, linux-kernel, ssantosh

On 09/02/2015 02:25 PM, santosh shilimkar wrote:
> 9/2/2015 10:58 AM, Murali Karicheri wrote:
>> On 09/02/2015 01:24 PM, santosh shilimkar wrote:
>>> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>>>> Santosh,
>>>>
>>
>> ---Cut-------------------
>>
>>>>> I suspected the same. I know back then we started with SERDES code
>>>>> with NETCP but as you already know, its a separate block which
>>>>> is needed for NIC card to work. Its more of phy and hence its
>>>>> having different address space is not surprising.
>>>>
>>>> Using Phy interface is not acceptable to the subsystem maintainer based
>>>> on the communication I had on this. Also the Phy here is tighly coupled
>>>> with the hardware block it is working with. So this model is not right
>>>> for SerDes driver as it require additional enhancements as described
>>>> below if needs to be used.
>>>>
>>> Thanks for update on that.
>>>
>>>> The serdes initialization procedure requires checking the status in the
>>>> hardware block (PCIe, 1G or 10G) and then taking corrective action.
>>>> This
>>>> means a Phy driver would require mapping of related hw address space
>>>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>>>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>>>> function that can be called from the respective hardware device driver.
>>>>   A device node of h/w device (PCIe or 1G) in such as looks like
>>>>
>>> Or SerDes driver can embed the status reg address space.
>>> This is read only access so should be fine.
>>>
>>>> pcie {
>>>>
>>>>      serdes@someaddress {
>>>>          reg = <address of serdes>;
>>>>      }
>>>> }
>>>>
>>>> hw driver will call ks2_serdes_init(node, hw_base_address) to
>>>> initialize
>>>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>>>> etc. The libary will be added to drivers/soc/ti/ and used by various
>>>> device drivers to initialize and use the phy. As the serdes is slightly
>>>> integrated with the hardware block, IMO, this is a better approach than
>>>> using the phy model. The API definitions will be added to
>>>> include/linux/soc/ti/ folder.
>>>>
>>> Serdes Driver with its status register address space might solve this
>>> sharing problem. Library might work but we should try to have driver
>>> considering there is a physical device. I don't have strong opinion
>>> on drivers vs library.
>>>
>>
>> In addition to checking status in the SerDes, it needs to also check the
>> status of the associated hardware block (PCIe, 1G, 10G etc). So this
>> means, same needs to be mapped twice, first by the above hardware device
>> drivers and then by the serdes driver which causes problem. My point is
>> since they both are tightly coupled, a libary is a better option. That
>> way the mapped address can be passed to the serdes API to perform the
>> required task, instead of using Phy API which doesn't allow us to do the
>> same. If SerDes h/w can be brought up independently, the Phy model fits
>> well.
>>
> As I said, I don't have strong preference and fine with library approach.
> I suggest you do a RFC to take this further. Include Arnd on CC for
> that.

Sure!

Murali
>
> Regards,
> Santosh
>
>
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone

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

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-02 18:42                 ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-02 18:42 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/02/2015 02:25 PM, santosh shilimkar wrote:
> 9/2/2015 10:58 AM, Murali Karicheri wrote:
>> On 09/02/2015 01:24 PM, santosh shilimkar wrote:
>>> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>>>> Santosh,
>>>>
>>
>> ---Cut-------------------
>>
>>>>> I suspected the same. I know back then we started with SERDES code
>>>>> with NETCP but as you already know, its a separate block which
>>>>> is needed for NIC card to work. Its more of phy and hence its
>>>>> having different address space is not surprising.
>>>>
>>>> Using Phy interface is not acceptable to the subsystem maintainer based
>>>> on the communication I had on this. Also the Phy here is tighly coupled
>>>> with the hardware block it is working with. So this model is not right
>>>> for SerDes driver as it require additional enhancements as described
>>>> below if needs to be used.
>>>>
>>> Thanks for update on that.
>>>
>>>> The serdes initialization procedure requires checking the status in the
>>>> hardware block (PCIe, 1G or 10G) and then taking corrective action.
>>>> This
>>>> means a Phy driver would require mapping of related hw address space
>>>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>>>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>>>> function that can be called from the respective hardware device driver.
>>>>   A device node of h/w device (PCIe or 1G) in such as looks like
>>>>
>>> Or SerDes driver can embed the status reg address space.
>>> This is read only access so should be fine.
>>>
>>>> pcie {
>>>>
>>>>      serdes at someaddress {
>>>>          reg = <address of serdes>;
>>>>      }
>>>> }
>>>>
>>>> hw driver will call ks2_serdes_init(node, hw_base_address) to
>>>> initialize
>>>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>>>> etc. The libary will be added to drivers/soc/ti/ and used by various
>>>> device drivers to initialize and use the phy. As the serdes is slightly
>>>> integrated with the hardware block, IMO, this is a better approach than
>>>> using the phy model. The API definitions will be added to
>>>> include/linux/soc/ti/ folder.
>>>>
>>> Serdes Driver with its status register address space might solve this
>>> sharing problem. Library might work but we should try to have driver
>>> considering there is a physical device. I don't have strong opinion
>>> on drivers vs library.
>>>
>>
>> In addition to checking status in the SerDes, it needs to also check the
>> status of the associated hardware block (PCIe, 1G, 10G etc). So this
>> means, same needs to be mapped twice, first by the above hardware device
>> drivers and then by the serdes driver which causes problem. My point is
>> since they both are tightly coupled, a libary is a better option. That
>> way the mapped address can be passed to the serdes API to perform the
>> required task, instead of using Phy API which doesn't allow us to do the
>> same. If SerDes h/w can be brought up independently, the Phy model fits
>> well.
>>
> As I said, I don't have strong preference and fine with library approach.
> I suggest you do a RFC to take this further. Include Arnd on CC for
> that.

Sure!

Murali
>
> Regards,
> Santosh
>
>
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-03 14:26         ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2015-09-03 14:26 UTC (permalink / raw)
  To: santosh shilimkar
  Cc: Kwok, WingMan, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
	galak, linux, devicetree, linux-arm-kernel, linux-kernel,
	ssantosh, Karicheri, Muralidharan

* santosh shilimkar <santosh.shilimkar@oracle.com> [150902 08:55]:
>
> I suspected the same. I know back then we started with SERDES code
> with NETCP but as you already know, its a separate block which
> is needed for NIC card to work. Its more of phy and hence its
> having different address space is not surprising.

The point Santosh is making here though is that any drivers
tinkering with registers belonging to a separate hardware block
is a recipe for a long term maintenance nightmare with mysterious
bugs popping up as things are not clocked or powered properly
or become racy with other drivers.

Each hardware block needs to have it's own driver and then the
drivers can communicate using some Linux generic APIs like clock,
regulator, phy, or mailbox frameworks.

Regards,

Tony

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-03 14:26         ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2015-09-03 14:26 UTC (permalink / raw)
  To: santosh shilimkar
  Cc: Kwok, WingMan, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ssantosh-DgEjT+Ai2ygdnm+yROfE0A, Karicheri, Muralidharan

* santosh shilimkar <santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> [150902 08:55]:
>
> I suspected the same. I know back then we started with SERDES code
> with NETCP but as you already know, its a separate block which
> is needed for NIC card to work. Its more of phy and hence its
> having different address space is not surprising.

The point Santosh is making here though is that any drivers
tinkering with registers belonging to a separate hardware block
is a recipe for a long term maintenance nightmare with mysterious
bugs popping up as things are not clocked or powered properly
or become racy with other drivers.

Each hardware block needs to have it's own driver and then the
drivers can communicate using some Linux generic APIs like clock,
regulator, phy, or mailbox frameworks.

Regards,

Tony
--
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] 39+ messages in thread

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-03 14:26         ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2015-09-03 14:26 UTC (permalink / raw)
  To: linux-arm-kernel

* santosh shilimkar <santosh.shilimkar@oracle.com> [150902 08:55]:
>
> I suspected the same. I know back then we started with SERDES code
> with NETCP but as you already know, its a separate block which
> is needed for NIC card to work. Its more of phy and hence its
> having different address space is not surprising.

The point Santosh is making here though is that any drivers
tinkering with registers belonging to a separate hardware block
is a recipe for a long term maintenance nightmare with mysterious
bugs popping up as things are not clocked or powered properly
or become racy with other drivers.

Each hardware block needs to have it's own driver and then the
drivers can communicate using some Linux generic APIs like clock,
regulator, phy, or mailbox frameworks.

Regards,

Tony

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
  2015-09-03 14:26         ` Tony Lindgren
  (?)
@ 2015-09-03 14:48           ` santosh.shilimkar
  -1 siblings, 0 replies; 39+ messages in thread
From: santosh.shilimkar @ 2015-09-03 14:48 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Kwok, WingMan, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
	galak, linux, devicetree, linux-arm-kernel, linux-kernel,
	ssantosh, Karicheri, Muralidharan

On 9/3/15 7:26 AM, Tony Lindgren wrote:
> * santosh shilimkar <santosh.shilimkar@oracle.com> [150902 08:55]:
>>
>> I suspected the same. I know back then we started with SERDES code
>> with NETCP but as you already know, its a separate block which
>> is needed for NIC card to work. Its more of phy and hence its
>> having different address space is not surprising.
>
> The point Santosh is making here though is that any drivers
> tinkering with registers belonging to a separate hardware block
> is a recipe for a long term maintenance nightmare with mysterious
> bugs popping up as things are not clocked or powered properly
> or become racy with other drivers.
>
> Each hardware block needs to have it's own driver and then the
> drivers can communicate using some Linux generic APIs like clock,
> regulator, phy, or mailbox frameworks.
>
Right !!

Regards,
Santosh




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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-03 14:48           ` santosh.shilimkar
  0 siblings, 0 replies; 39+ messages in thread
From: santosh.shilimkar @ 2015-09-03 14:48 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Kwok, WingMan, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
	galak, linux, devicetree, linux-arm-kernel, linux-kernel,
	ssantosh, Karicheri, Muralidharan

On 9/3/15 7:26 AM, Tony Lindgren wrote:
> * santosh shilimkar <santosh.shilimkar@oracle.com> [150902 08:55]:
>>
>> I suspected the same. I know back then we started with SERDES code
>> with NETCP but as you already know, its a separate block which
>> is needed for NIC card to work. Its more of phy and hence its
>> having different address space is not surprising.
>
> The point Santosh is making here though is that any drivers
> tinkering with registers belonging to a separate hardware block
> is a recipe for a long term maintenance nightmare with mysterious
> bugs popping up as things are not clocked or powered properly
> or become racy with other drivers.
>
> Each hardware block needs to have it's own driver and then the
> drivers can communicate using some Linux generic APIs like clock,
> regulator, phy, or mailbox frameworks.
>
Right !!

Regards,
Santosh

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

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-03 14:48           ` santosh.shilimkar
  0 siblings, 0 replies; 39+ messages in thread
From: santosh.shilimkar at oracle.com @ 2015-09-03 14:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/3/15 7:26 AM, Tony Lindgren wrote:
> * santosh shilimkar <santosh.shilimkar@oracle.com> [150902 08:55]:
>>
>> I suspected the same. I know back then we started with SERDES code
>> with NETCP but as you already know, its a separate block which
>> is needed for NIC card to work. Its more of phy and hence its
>> having different address space is not surprising.
>
> The point Santosh is making here though is that any drivers
> tinkering with registers belonging to a separate hardware block
> is a recipe for a long term maintenance nightmare with mysterious
> bugs popping up as things are not clocked or powered properly
> or become racy with other drivers.
>
> Each hardware block needs to have it's own driver and then the
> drivers can communicate using some Linux generic APIs like clock,
> regulator, phy, or mailbox frameworks.
>
Right !!

Regards,
Santosh

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-03 19:18           ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-03 19:18 UTC (permalink / raw)
  To: Tony Lindgren, santosh shilimkar
  Cc: Kwok, WingMan, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
	galak, linux, devicetree, linux-arm-kernel, linux-kernel,
	ssantosh

Tony,
On 09/03/2015 10:26 AM, Tony Lindgren wrote:
> * santosh shilimkar <santosh.shilimkar@oracle.com> [150902 08:55]:
>>
>> I suspected the same. I know back then we started with SERDES code
>> with NETCP but as you already know, its a separate block which
>> is needed for NIC card to work. Its more of phy and hence its
>> having different address space is not surprising.
>
> The point Santosh is making here though is that any drivers
> tinkering with registers belonging to a separate hardware block
> is a recipe for a long term maintenance nightmare with mysterious

That is what we want to avoid as well. If I interpret your statement 
correctly, you don't want SerDes driver update the register of say 
SGMII, right? But we will have to based on the hardware design. So it 
can't be a standalone device driver IMO and it has to be part of the 
respective peripheral device driver.

> bugs popping up as things are not clocked or powered properly
> or become racy with other drivers.
>
> Each hardware block needs to have it's own driver and then the
> drivers can communicate using some Linux generic APIs like clock,
> regulator, phy, or mailbox frameworks.

That depends on what your definition of a hardware block is. Inside 
NetCP, there are many hardware blocks that work together to provide the 
NIC functionality, and SerDes is one of them. Where ever possible, we 
have separate drivers :- knav qmss, knav pkt dma, ethss, mdio etc. Ethss 
driver manages Eth subsystem that includes SGMII and SerDes. 
Unfortunately SerDes is tightly integrated with ethss and taking it out 
as a separate driver (Say Phy) is not a good idea. We will posting an 
RFC for this soon and probably we can discuss it more then.

Probably we will fold this into the RFC series to give this a better 
context.

Murali

>
> Regards,
>
> Tony
>


-- 
Murali Karicheri
Linux Kernel, Keystone

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-03 19:18           ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-03 19:18 UTC (permalink / raw)
  To: Tony Lindgren, santosh shilimkar
  Cc: Kwok, WingMan, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ssantosh-DgEjT+Ai2ygdnm+yROfE0A

Tony,
On 09/03/2015 10:26 AM, Tony Lindgren wrote:
> * santosh shilimkar <santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> [150902 08:55]:
>>
>> I suspected the same. I know back then we started with SERDES code
>> with NETCP but as you already know, its a separate block which
>> is needed for NIC card to work. Its more of phy and hence its
>> having different address space is not surprising.
>
> The point Santosh is making here though is that any drivers
> tinkering with registers belonging to a separate hardware block
> is a recipe for a long term maintenance nightmare with mysterious

That is what we want to avoid as well. If I interpret your statement 
correctly, you don't want SerDes driver update the register of say 
SGMII, right? But we will have to based on the hardware design. So it 
can't be a standalone device driver IMO and it has to be part of the 
respective peripheral device driver.

> bugs popping up as things are not clocked or powered properly
> or become racy with other drivers.
>
> Each hardware block needs to have it's own driver and then the
> drivers can communicate using some Linux generic APIs like clock,
> regulator, phy, or mailbox frameworks.

That depends on what your definition of a hardware block is. Inside 
NetCP, there are many hardware blocks that work together to provide the 
NIC functionality, and SerDes is one of them. Where ever possible, we 
have separate drivers :- knav qmss, knav pkt dma, ethss, mdio etc. Ethss 
driver manages Eth subsystem that includes SGMII and SerDes. 
Unfortunately SerDes is tightly integrated with ethss and taking it out 
as a separate driver (Say Phy) is not a good idea. We will posting an 
RFC for this soon and probably we can discuss it more then.

Probably we will fold this into the RFC series to give this a better 
context.

Murali

>
> Regards,
>
> Tony
>


-- 
Murali Karicheri
Linux Kernel, Keystone
--
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] 39+ messages in thread

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-03 19:18           ` Murali Karicheri
  0 siblings, 0 replies; 39+ messages in thread
From: Murali Karicheri @ 2015-09-03 19:18 UTC (permalink / raw)
  To: linux-arm-kernel

Tony,
On 09/03/2015 10:26 AM, Tony Lindgren wrote:
> * santosh shilimkar <santosh.shilimkar@oracle.com> [150902 08:55]:
>>
>> I suspected the same. I know back then we started with SERDES code
>> with NETCP but as you already know, its a separate block which
>> is needed for NIC card to work. Its more of phy and hence its
>> having different address space is not surprising.
>
> The point Santosh is making here though is that any drivers
> tinkering with registers belonging to a separate hardware block
> is a recipe for a long term maintenance nightmare with mysterious

That is what we want to avoid as well. If I interpret your statement 
correctly, you don't want SerDes driver update the register of say 
SGMII, right? But we will have to based on the hardware design. So it 
can't be a standalone device driver IMO and it has to be part of the 
respective peripheral device driver.

> bugs popping up as things are not clocked or powered properly
> or become racy with other drivers.
>
> Each hardware block needs to have it's own driver and then the
> drivers can communicate using some Linux generic APIs like clock,
> regulator, phy, or mailbox frameworks.

That depends on what your definition of a hardware block is. Inside 
NetCP, there are many hardware blocks that work together to provide the 
NIC functionality, and SerDes is one of them. Where ever possible, we 
have separate drivers :- knav qmss, knav pkt dma, ethss, mdio etc. Ethss 
driver manages Eth subsystem that includes SGMII and SerDes. 
Unfortunately SerDes is tightly integrated with ethss and taking it out 
as a separate driver (Say Phy) is not a good idea. We will posting an 
RFC for this soon and probably we can discuss it more then.

Probably we will fold this into the RFC series to give this a better 
context.

Murali

>
> Regards,
>
> Tony
>


-- 
Murali Karicheri
Linux Kernel, Keystone

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-08 15:13             ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2015-09-08 15:13 UTC (permalink / raw)
  To: Murali Karicheri
  Cc: santosh shilimkar, Kwok, WingMan, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux, devicetree,
	linux-arm-kernel, linux-kernel, ssantosh

* Murali Karicheri <m-karicheri2@ti.com> [150903 12:21]:
> Tony,
> On 09/03/2015 10:26 AM, Tony Lindgren wrote:
> >* santosh shilimkar <santosh.shilimkar@oracle.com> [150902 08:55]:
> >>
> >>I suspected the same. I know back then we started with SERDES code
> >>with NETCP but as you already know, its a separate block which
> >>is needed for NIC card to work. Its more of phy and hence its
> >>having different address space is not surprising.
> >
> >The point Santosh is making here though is that any drivers
> >tinkering with registers belonging to a separate hardware block
> >is a recipe for a long term maintenance nightmare with mysterious
> 
> That is what we want to avoid as well. If I interpret your statement
> correctly, you don't want SerDes driver update the register of say SGMII,
> right? But we will have to based on the hardware design. So it can't be a
> standalone device driver IMO and it has to be part of the respective
> peripheral device driver.

If it's a separate target on the interconnect it should be a separate
driver. Depending on the SoC version these targets can move around
as we've seen.

> >bugs popping up as things are not clocked or powered properly
> >or become racy with other drivers.
> >
> >Each hardware block needs to have it's own driver and then the
> >drivers can communicate using some Linux generic APIs like clock,
> >regulator, phy, or mailbox frameworks.
> 
> That depends on what your definition of a hardware block is. Inside NetCP,
> there are many hardware blocks that work together to provide the NIC
> functionality, and SerDes is one of them. Where ever possible, we have
> separate drivers :- knav qmss, knav pkt dma, ethss, mdio etc. Ethss driver
> manages Eth subsystem that includes SGMII and SerDes. Unfortunately SerDes
> is tightly integrated with ethss and taking it out as a separate driver (Say
> Phy) is not a good idea. We will posting an RFC for this soon and probably
> we can discuss it more then.

A separate target on the interconnect is the best criteria to use
here. This is because two targets may or may not share some resources
and can get rearranged depending on the SoC.

Regards,

Tony

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

* Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-08 15:13             ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2015-09-08 15:13 UTC (permalink / raw)
  To: Murali Karicheri
  Cc: santosh shilimkar, Kwok, WingMan, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ssantosh-DgEjT+Ai2ygdnm+yROfE0A

* Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org> [150903 12:21]:
> Tony,
> On 09/03/2015 10:26 AM, Tony Lindgren wrote:
> >* santosh shilimkar <santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> [150902 08:55]:
> >>
> >>I suspected the same. I know back then we started with SERDES code
> >>with NETCP but as you already know, its a separate block which
> >>is needed for NIC card to work. Its more of phy and hence its
> >>having different address space is not surprising.
> >
> >The point Santosh is making here though is that any drivers
> >tinkering with registers belonging to a separate hardware block
> >is a recipe for a long term maintenance nightmare with mysterious
> 
> That is what we want to avoid as well. If I interpret your statement
> correctly, you don't want SerDes driver update the register of say SGMII,
> right? But we will have to based on the hardware design. So it can't be a
> standalone device driver IMO and it has to be part of the respective
> peripheral device driver.

If it's a separate target on the interconnect it should be a separate
driver. Depending on the SoC version these targets can move around
as we've seen.

> >bugs popping up as things are not clocked or powered properly
> >or become racy with other drivers.
> >
> >Each hardware block needs to have it's own driver and then the
> >drivers can communicate using some Linux generic APIs like clock,
> >regulator, phy, or mailbox frameworks.
> 
> That depends on what your definition of a hardware block is. Inside NetCP,
> there are many hardware blocks that work together to provide the NIC
> functionality, and SerDes is one of them. Where ever possible, we have
> separate drivers :- knav qmss, knav pkt dma, ethss, mdio etc. Ethss driver
> manages Eth subsystem that includes SGMII and SerDes. Unfortunately SerDes
> is tightly integrated with ethss and taking it out as a separate driver (Say
> Phy) is not a good idea. We will posting an RFC for this soon and probably
> we can discuss it more then.

A separate target on the interconnect is the best criteria to use
here. This is because two targets may or may not share some resources
and can get rearranged depending on the SoC.

Regards,

Tony
--
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] 39+ messages in thread

* [PATCH] ARM: dts: keystone: use one to one address translations under netcp
@ 2015-09-08 15:13             ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2015-09-08 15:13 UTC (permalink / raw)
  To: linux-arm-kernel

* Murali Karicheri <m-karicheri2@ti.com> [150903 12:21]:
> Tony,
> On 09/03/2015 10:26 AM, Tony Lindgren wrote:
> >* santosh shilimkar <santosh.shilimkar@oracle.com> [150902 08:55]:
> >>
> >>I suspected the same. I know back then we started with SERDES code
> >>with NETCP but as you already know, its a separate block which
> >>is needed for NIC card to work. Its more of phy and hence its
> >>having different address space is not surprising.
> >
> >The point Santosh is making here though is that any drivers
> >tinkering with registers belonging to a separate hardware block
> >is a recipe for a long term maintenance nightmare with mysterious
> 
> That is what we want to avoid as well. If I interpret your statement
> correctly, you don't want SerDes driver update the register of say SGMII,
> right? But we will have to based on the hardware design. So it can't be a
> standalone device driver IMO and it has to be part of the respective
> peripheral device driver.

If it's a separate target on the interconnect it should be a separate
driver. Depending on the SoC version these targets can move around
as we've seen.

> >bugs popping up as things are not clocked or powered properly
> >or become racy with other drivers.
> >
> >Each hardware block needs to have it's own driver and then the
> >drivers can communicate using some Linux generic APIs like clock,
> >regulator, phy, or mailbox frameworks.
> 
> That depends on what your definition of a hardware block is. Inside NetCP,
> there are many hardware blocks that work together to provide the NIC
> functionality, and SerDes is one of them. Where ever possible, we have
> separate drivers :- knav qmss, knav pkt dma, ethss, mdio etc. Ethss driver
> manages Eth subsystem that includes SGMII and SerDes. Unfortunately SerDes
> is tightly integrated with ethss and taking it out as a separate driver (Say
> Phy) is not a good idea. We will posting an RFC for this soon and probably
> we can discuss it more then.

A separate target on the interconnect is the best criteria to use
here. This is because two targets may or may not share some resources
and can get rearranged depending on the SoC.

Regards,

Tony

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

end of thread, other threads:[~2015-09-08 15:14 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 20:28 [PATCH] ARM: dts: keystone: use one to one address translations under netcp WingMan Kwok
2015-09-01 20:28 ` WingMan Kwok
2015-09-01 20:28 ` WingMan Kwok
2015-09-01 21:19 ` santosh.shilimkar
2015-09-01 21:19   ` santosh.shilimkar at oracle.com
2015-09-01 21:19   ` santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA
2015-09-02 15:31   ` Kwok, WingMan
2015-09-02 15:31     ` Kwok, WingMan
2015-09-02 15:31     ` Kwok, WingMan
2015-09-02 15:50     ` santosh shilimkar
2015-09-02 15:50       ` santosh shilimkar
2015-09-02 15:50       ` santosh shilimkar
2015-09-02 16:35       ` Murali Karicheri
2015-09-02 16:35         ` Murali Karicheri
2015-09-02 16:35         ` Murali Karicheri
2015-09-02 17:24         ` santosh shilimkar
2015-09-02 17:24           ` santosh shilimkar
2015-09-02 17:24           ` santosh shilimkar
2015-09-02 17:58           ` Murali Karicheri
2015-09-02 17:58             ` Murali Karicheri
2015-09-02 17:58             ` Murali Karicheri
2015-09-02 18:25             ` santosh shilimkar
2015-09-02 18:25               ` santosh shilimkar
2015-09-02 18:25               ` santosh shilimkar
2015-09-02 18:42               ` Murali Karicheri
2015-09-02 18:42                 ` Murali Karicheri
2015-09-02 18:42                 ` Murali Karicheri
2015-09-03 14:26       ` Tony Lindgren
2015-09-03 14:26         ` Tony Lindgren
2015-09-03 14:26         ` Tony Lindgren
2015-09-03 14:48         ` santosh.shilimkar
2015-09-03 14:48           ` santosh.shilimkar at oracle.com
2015-09-03 14:48           ` santosh.shilimkar
2015-09-03 19:18         ` Murali Karicheri
2015-09-03 19:18           ` Murali Karicheri
2015-09-03 19:18           ` Murali Karicheri
2015-09-08 15:13           ` Tony Lindgren
2015-09-08 15:13             ` Tony Lindgren
2015-09-08 15:13             ` Tony Lindgren

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.