MIPS: Octeon: fix CN6640 hang on XAUI init
PATCH 1/2 MIPS: Octeon: fix CN6640 hang on XAUI init
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 <[email protected]>
--- arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c +3 -2
@@ -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 ;
Signature · 1 line
2.35.1
PATCH 2/2 MIPS: Octeon: support all interfaces on CN66XX
CN66XX_PASS1_0 has 7 interfaces, other revisions have 8 interfaces.
Signed-off-by Stijn Tintel <[email protected]>
--- arch/mips/cavium-octeon/executive/cvmx-helper.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/mips/cavium-octeon/executive/cvmx-helper.c +6 -0
@@ -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 ))
Signature · 1 line
2.35.1
Re: [PATCH 2/2] MIPS: Octeon: support all interfaces on CN66XX
Quoted 26 lines · Stijn Tintel
CN66XX_PASS1_0has 7 interfaces, other revisions have 8 interfaces.Signed-off-by Stijn Tintel <[email protected]>--- arch/mips/cavium-octeon/executive/cvmx-helper.c | 6 ++++++ 1 file changed, 6 insertions(+)arch/mips/cavium-octeon/executive/cvmx-helper.c +6
-0@@ -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 ))Signature · 1 line
2.35.1
applied to mips-next.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]
Quoted 28 lines · Stijn Tintel
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 <[email protected]>--- arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c +3
-2@@ -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 ;Signature · 1 line
2.35.1
applied to mips-next.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]