All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] MIPS: Octeon: fix CN6640 hang on XAUI init
@ 2022-04-03  2:59 Stijn Tintel
  2022-04-03  2:59 ` [PATCH 2/2] MIPS: Octeon: support all interfaces on CN66XX Stijn Tintel
  2022-04-26 14:30 ` [PATCH 1/2] MIPS: Octeon: fix CN6640 hang on XAUI init Thomas Bogendoerfer
  0 siblings, 2 replies; 4+ messages in thread
From: Stijn Tintel @ 2022-04-03  2:59 UTC (permalink / raw)
  To: linux-mips; +Cc: tsbogend, rdunlap, linux-kernel

Some CN66XX series Octeon II chips seem to hang if a reset is issued on
XAUI initialization. Avoid the hang by disabling the reset.

Tested on SNIC10E.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
 arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
index fea71a85bb29..a92632223497 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
@@ -156,8 +156,9 @@ int __cvmx_helper_xaui_enable(int interface)
 	xauiCtl.u64 = cvmx_read_csr(CVMX_PCSXX_CONTROL1_REG(interface));
 	xauiCtl.s.lo_pwr = 0;
 
-	/* Issuing a reset here seems to hang some CN68XX chips. */
-	if (!OCTEON_IS_MODEL(OCTEON_CN68XX_PASS1_X) &&
+	/* Issuing a reset here seems to hang some CN66XX/CN68XX chips. */
+	if (!OCTEON_IS_MODEL(OCTEON_CN66XX) &&
+	    !OCTEON_IS_MODEL(OCTEON_CN68XX_PASS1_X) &&
 	    !OCTEON_IS_MODEL(OCTEON_CN68XX_PASS2_X))
 		xauiCtl.s.reset = 1;
 
-- 
2.35.1


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

* [PATCH 2/2] MIPS: Octeon: support all interfaces on CN66XX
  2022-04-03  2:59 [PATCH 1/2] MIPS: Octeon: fix CN6640 hang on XAUI init Stijn Tintel
@ 2022-04-03  2:59 ` Stijn Tintel
  2022-04-26 14:30   ` Thomas Bogendoerfer
  2022-04-26 14:30 ` [PATCH 1/2] MIPS: Octeon: fix CN6640 hang on XAUI init Thomas Bogendoerfer
  1 sibling, 1 reply; 4+ messages in thread
From: Stijn Tintel @ 2022-04-03  2:59 UTC (permalink / raw)
  To: linux-mips; +Cc: tsbogend, rdunlap, linux-kernel

CN66XX_PASS1_0 has 7 interfaces, other revisions have 8 interfaces.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
 arch/mips/cavium-octeon/executive/cvmx-helper.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index b22f664e2d29..6f49fd9be1f3 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
@@ -61,6 +61,12 @@ int cvmx_helper_get_number_of_interfaces(void)
 {
 	if (OCTEON_IS_MODEL(OCTEON_CN68XX))
 		return 9;
+	if (OCTEON_IS_MODEL(OCTEON_CN66XX)) {
+		if (OCTEON_IS_MODEL(OCTEON_CN66XX_PASS1_0))
+			return 7;
+		else
+			return 8;
+	}
 	if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX))
 		return 4;
 	if (OCTEON_IS_MODEL(OCTEON_CN7XXX))
-- 
2.35.1


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

* Re: [PATCH 1/2] MIPS: Octeon: fix CN6640 hang on XAUI init
  2022-04-03  2:59 [PATCH 1/2] MIPS: Octeon: fix CN6640 hang on XAUI init Stijn Tintel
  2022-04-03  2:59 ` [PATCH 2/2] MIPS: Octeon: support all interfaces on CN66XX Stijn Tintel
@ 2022-04-26 14:30 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2022-04-26 14:30 UTC (permalink / raw)
  To: Stijn Tintel; +Cc: linux-mips, rdunlap, linux-kernel

On Sun, Apr 03, 2022 at 05:59:49AM +0300, Stijn Tintel wrote:
> Some CN66XX series Octeon II chips seem to hang if a reset is issued on
> XAUI initialization. Avoid the hang by disabling the reset.
> 
> Tested on SNIC10E.
> 
> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
> ---
>  arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
> index fea71a85bb29..a92632223497 100644
> --- a/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
> @@ -156,8 +156,9 @@ int __cvmx_helper_xaui_enable(int interface)
>  	xauiCtl.u64 = cvmx_read_csr(CVMX_PCSXX_CONTROL1_REG(interface));
>  	xauiCtl.s.lo_pwr = 0;
>  
> -	/* Issuing a reset here seems to hang some CN68XX chips. */
> -	if (!OCTEON_IS_MODEL(OCTEON_CN68XX_PASS1_X) &&
> +	/* Issuing a reset here seems to hang some CN66XX/CN68XX chips. */
> +	if (!OCTEON_IS_MODEL(OCTEON_CN66XX) &&
> +	    !OCTEON_IS_MODEL(OCTEON_CN68XX_PASS1_X) &&
>  	    !OCTEON_IS_MODEL(OCTEON_CN68XX_PASS2_X))
>  		xauiCtl.s.reset = 1;
>  
> -- 
> 2.35.1

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* Re: [PATCH 2/2] MIPS: Octeon: support all interfaces on CN66XX
  2022-04-03  2:59 ` [PATCH 2/2] MIPS: Octeon: support all interfaces on CN66XX Stijn Tintel
@ 2022-04-26 14:30   ` Thomas Bogendoerfer
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2022-04-26 14:30 UTC (permalink / raw)
  To: Stijn Tintel; +Cc: linux-mips, rdunlap, linux-kernel

On Sun, Apr 03, 2022 at 05:59:50AM +0300, Stijn Tintel wrote:
> CN66XX_PASS1_0 has 7 interfaces, other revisions have 8 interfaces.
> 
> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
> ---
>  arch/mips/cavium-octeon/executive/cvmx-helper.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
> index b22f664e2d29..6f49fd9be1f3 100644
> --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
> @@ -61,6 +61,12 @@ int cvmx_helper_get_number_of_interfaces(void)
>  {
>  	if (OCTEON_IS_MODEL(OCTEON_CN68XX))
>  		return 9;
> +	if (OCTEON_IS_MODEL(OCTEON_CN66XX)) {
> +		if (OCTEON_IS_MODEL(OCTEON_CN66XX_PASS1_0))
> +			return 7;
> +		else
> +			return 8;
> +	}
>  	if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX))
>  		return 4;
>  	if (OCTEON_IS_MODEL(OCTEON_CN7XXX))
> -- 
> 2.35.1

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2022-04-26 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03  2:59 [PATCH 1/2] MIPS: Octeon: fix CN6640 hang on XAUI init Stijn Tintel
2022-04-03  2:59 ` [PATCH 2/2] MIPS: Octeon: support all interfaces on CN66XX Stijn Tintel
2022-04-26 14:30   ` Thomas Bogendoerfer
2022-04-26 14:30 ` [PATCH 1/2] MIPS: Octeon: fix CN6640 hang on XAUI init Thomas Bogendoerfer

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.