svn commit: r207357 - user/jmallett/octeon/sys/contrib/octeon-sdk
Juli Mallett
jmallett at FreeBSD.org
Thu Apr 29 07:07:44 UTC 2010
Author: jmallett
Date: Thu Apr 29 07:07:43 2010
New Revision: 207357
URL: http://svn.freebsd.org/changeset/base/207357
Log:
Add sections for Lanner boards and add basic support for detecting the PHYs
and link state on the MR320.
Modified:
user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-app-init.h
user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-helper-board.c
Modified: user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-app-init.h
==============================================================================
--- user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-app-init.h Thu Apr 29 06:46:03 2010 (r207356)
+++ user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-app-init.h Thu Apr 29 07:07:43 2010 (r207357)
@@ -194,6 +194,9 @@ enum cvmx_board_types_enum {
/* Set aside a range for customer private use. The SDK won't
** use any numbers in this range. */
CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001,
+#if defined(OCTEON_VENDOR_LANNER)
+ CVMX_BOARD_TYPE_CUST_LANNER_MR320= 20002,
+#endif
CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000,
/* The remaining range is reserved for future use. */
@@ -265,6 +268,9 @@ static inline const char *cvmx_board_typ
/* Customer private range */
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN)
+#if defined(OCTEON_VENDOR_LANNER)
+ ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR320)
+#endif
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX)
}
return "Unsupported Board";
Modified: user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-helper-board.c
==============================================================================
--- user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-helper-board.c Thu Apr 29 06:46:03 2010 (r207356)
+++ user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-helper-board.c Thu Apr 29 07:07:43 2010 (r207357)
@@ -174,6 +174,22 @@ int cvmx_helper_board_get_mii_address(in
return -1;
case CVMX_BOARD_TYPE_BBGW_REF:
return -1; /* No PHYs are connected to Octeon, everything is through switch */
+
+ /* Private vendor-defined boards. */
+#if defined(OCTEON_VENDOR_LANNER)
+ case CVMX_BOARD_TYPE_CUST_LANNER_MR320:
+ switch (ipd_port) {
+ case 0:
+ /* XXX Switch PHY? */
+ return -1;
+ case 1:
+ return 1;
+ case 2:
+ return 2;
+ default:
+ return -1;
+ }
+#endif
}
/* Some unknown board. Somebody forgot to update this function... */
@@ -269,6 +285,19 @@ cvmx_helper_link_info_t __cvmx_helper_bo
return result;
}
break;
+ /* Private vendor-defined boards. */
+#if defined(OCTEON_VENDOR_LANNER)
+ case CVMX_BOARD_TYPE_CUST_LANNER_MR320:
+ /* Port 0 connects to the switch */
+ if (ipd_port == 0)
+ {
+ result.s.link_up = 1;
+ result.s.full_duplex = 1;
+ result.s.speed = 1000;
+ return result;
+ }
+ break;
+#endif
}
#endif
More information about the svn-src-user
mailing list