From b3a6fcb3b7d15879d3ee367c7bd0995068695f85 Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Mon, 19 Nov 2012 08:35:58 +0000 Subject: [PATCH] Return port numbers for ATCA-7220 SPI interfaces in a different place for consistency reasons, and to ensure that CRC addition is disabled on output. With this, transmit seems to be working properly on the ATCA-7220. --- sys/contrib/octeon-sdk/cvmx-helper-board.c | 8 -------- sys/contrib/octeon-sdk/cvmx-helper-spi.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/sys/contrib/octeon-sdk/cvmx-helper-board.c b/sys/contrib/octeon-sdk/cvmx-helper-board.c index 2582dae3f3bb..deb60186556a 100644 --- a/sys/contrib/octeon-sdk/cvmx-helper-board.c +++ b/sys/contrib/octeon-sdk/cvmx-helper-board.c @@ -1312,14 +1312,6 @@ int __cvmx_helper_board_interface_probe(int interface, int supported_ports) if (interface == 1) return 12; break; -#endif -#if defined(OCTEON_VENDOR_RADISYS) - case CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE: - if (interface == 0) - return 13; - if (interface == 1) - return 8; - return 0; #endif } #ifdef CVMX_BUILD_FOR_UBOOT diff --git a/sys/contrib/octeon-sdk/cvmx-helper-spi.c b/sys/contrib/octeon-sdk/cvmx-helper-spi.c index 960da0e70e95..317cc76ba331 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;