summaryrefslogtreecommitdiffstats
path: root/sys/contrib/octeon-sdk/cvmx-helper-spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/octeon-sdk/cvmx-helper-spi.c')
-rw-r--r--sys/contrib/octeon-sdk/cvmx-helper-spi.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/contrib/octeon-sdk/cvmx-helper-spi.c b/sys/contrib/octeon-sdk/cvmx-helper-spi.c
index c5916a1..317cc76 100644
--- a/sys/contrib/octeon-sdk/cvmx-helper-spi.c
+++ b/sys/contrib/octeon-sdk/cvmx-helper-spi.c
@@ -104,6 +104,16 @@ int __cvmx_helper_spi_enumerate(int interface)
}
#endif
+#if defined(OCTEON_VENDOR_RADISYS)
+ if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) {
+ if (interface == 0)
+ return 13;
+ if (interface == 1)
+ return 8;
+ return 0;
+ }
+#endif
+
if ((cvmx_sysinfo_get()->board_type != CVMX_BOARD_TYPE_SIM) &&
cvmx_spi4000_is_present(interface))
return 10;
@@ -164,6 +174,13 @@ int __cvmx_helper_spi_enable(int interface)
cvmx_pip_prt_cfgx_t port_config;
port_config.u64 = cvmx_read_csr(CVMX_PIP_PRT_CFGX(ipd_port));
port_config.s.crc_en = 1;
+#ifdef OCTEON_VENDOR_RADISYS
+ /*
+ * Incoming packets on the RSYS4GBE have the FCS stripped.
+ */
+ if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE)
+ port_config.s.crc_en = 0;
+#endif
cvmx_write_csr(CVMX_PIP_PRT_CFGX(ipd_port), port_config.u64);
}
OpenPOWER on IntegriCloud