diff options
author | jmallett <jmallett@FreeBSD.org> | 2010-11-08 21:22:55 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2010-11-08 21:22:55 +0000 |
commit | 4969d1f4dda305cf889e6080f173c85a6713c0ad (patch) | |
tree | a420237d9b45bc42899845ff041982ca319d272e /sys/contrib/octeon-sdk | |
parent | a53a6b6520449f28bef471a3d9aba56f70350a0c (diff) | |
download | FreeBSD-src-4969d1f4dda305cf889e6080f173c85a6713c0ad.zip FreeBSD-src-4969d1f4dda305cf889e6080f173c85a6713c0ad.tar.gz |
o) Recognize the Lanner MR-730.
o) Fix enumeration of PHY addresses on the MR-955.
o) Parse link state for the MR-730 using the Broadcom PHY support in the SDK.
It's not clear that this is entirely-correct, but it seems to work. Since
this board uses a BCM5482S, this may mean that we work correctly for copper
but not SFI, which is untested.
Diffstat (limited to 'sys/contrib/octeon-sdk')
-rw-r--r-- | sys/contrib/octeon-sdk/cvmx-app-init.h | 6 | ||||
-rw-r--r-- | sys/contrib/octeon-sdk/cvmx-helper-board.c | 16 | ||||
-rw-r--r-- | sys/contrib/octeon-sdk/cvmx-helper.c | 2 |
3 files changed, 21 insertions, 3 deletions
diff --git a/sys/contrib/octeon-sdk/cvmx-app-init.h b/sys/contrib/octeon-sdk/cvmx-app-init.h index 8f768ed..8b43bcf 100644 --- a/sys/contrib/octeon-sdk/cvmx-app-init.h +++ b/sys/contrib/octeon-sdk/cvmx-app-init.h @@ -193,6 +193,9 @@ enum cvmx_board_types_enum { CVMX_BOARD_TYPE_CUST_GCT108 = 10012, CVMX_BOARD_TYPE_CUST_AGS109 = 10013, CVMX_BOARD_TYPE_CUST_GCT110 = 10014, +#if defined(OCTEON_VENDOR_LANNER) + CVMX_BOARD_TYPE_CUST_LANNER_MR730= 10021, +#endif CVMX_BOARD_TYPE_CUST_DEFINED_MAX = 20000, /* Set aside a range for customer private use. The SDK won't @@ -272,6 +275,9 @@ static inline const char *cvmx_board_type_to_string(enum cvmx_board_types_enum t ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GCT108) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_AGS109) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GCT110) +#if defined(OCTEON_VENDOR_LANNER) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR730) +#endif ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DEFINED_MAX) /* Customer private range */ diff --git a/sys/contrib/octeon-sdk/cvmx-helper-board.c b/sys/contrib/octeon-sdk/cvmx-helper-board.c index cca2b22..4efc825 100644 --- a/sys/contrib/octeon-sdk/cvmx-helper-board.c +++ b/sys/contrib/octeon-sdk/cvmx-helper-board.c @@ -114,9 +114,6 @@ int cvmx_helper_board_get_mii_address(int ipd_port) case CVMX_BOARD_TYPE_EBT5800: case CVMX_BOARD_TYPE_THUNDER: case CVMX_BOARD_TYPE_NICPRO2: -#if defined(OCTEON_VENDOR_LANNER) - case CVMX_BOARD_TYPE_CUST_LANNER_MR955: -#endif /* Interface 0 is SPI4, interface 1 is RGMII */ if ((ipd_port >= 16) && (ipd_port < 20)) return ipd_port - 16; @@ -180,6 +177,15 @@ int cvmx_helper_board_get_mii_address(int ipd_port) /* Private vendor-defined boards. */ #if defined(OCTEON_VENDOR_LANNER) + case CVMX_BOARD_TYPE_CUST_LANNER_MR955: + /* Interface 1 is 12 BCM5482S PHYs. */ + if ((ipd_port >= 16) && (ipd_port < 28)) + return ipd_port - 16; + return -1; + case CVMX_BOARD_TYPE_CUST_LANNER_MR730: + if ((ipd_port >= 0) && (ipd_port < 4)) + return ipd_port; + return -1; case CVMX_BOARD_TYPE_CUST_LANNER_MR320: /* Port 0 is a Marvell 88E6161 switch, ports 1 and 2 are Marvell 88E1111 interfaces. */ @@ -291,6 +297,10 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port) break; /* Private vendor-defined boards. */ #if defined(OCTEON_VENDOR_LANNER) + case CVMX_BOARD_TYPE_CUST_LANNER_MR730: + /* Ports are BCM5482S */ + is_broadcom_phy = 1; + break; case CVMX_BOARD_TYPE_CUST_LANNER_MR320: /* Port 0 connects to the switch */ if (ipd_port == 0) diff --git a/sys/contrib/octeon-sdk/cvmx-helper.c b/sys/contrib/octeon-sdk/cvmx-helper.c index cd155bb..fbb1316 100644 --- a/sys/contrib/octeon-sdk/cvmx-helper.c +++ b/sys/contrib/octeon-sdk/cvmx-helper.c @@ -105,6 +105,8 @@ int cvmx_helper_get_number_of_interfaces(void) #if defined(OCTEON_VENDOR_LANNER) case CVMX_BOARD_TYPE_CUST_LANNER_MR955: return 2; + case CVMX_BOARD_TYPE_CUST_LANNER_MR730: + return 1; #endif default: break; |