Author: jmallett
Date: Mon Nov  8 21:22:55 2010
New Revision: 215014
URL: http://svn.freebsd.org/changeset/base/215014

Log:
  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.

Modified:
  head/sys/contrib/octeon-sdk/cvmx-app-init.h
  head/sys/contrib/octeon-sdk/cvmx-helper-board.c
  head/sys/contrib/octeon-sdk/cvmx-helper.c

Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h
==============================================================================
--- head/sys/contrib/octeon-sdk/cvmx-app-init.h Mon Nov  8 20:57:08 2010        
(r215013)
+++ head/sys/contrib/octeon-sdk/cvmx-app-init.h Mon Nov  8 21:22:55 2010        
(r215014)
@@ -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_typ
         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 */

Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c
==============================================================================
--- head/sys/contrib/octeon-sdk/cvmx-helper-board.c     Mon Nov  8 20:57:08 
2010        (r215013)
+++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c     Mon Nov  8 21:22:55 
2010        (r215014)
@@ -114,9 +114,6 @@ int cvmx_helper_board_get_mii_address(in
         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(in
 
        /* 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_bo
             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)

Modified: head/sys/contrib/octeon-sdk/cvmx-helper.c
==============================================================================
--- head/sys/contrib/octeon-sdk/cvmx-helper.c   Mon Nov  8 20:57:08 2010        
(r215013)
+++ head/sys/contrib/octeon-sdk/cvmx-helper.c   Mon Nov  8 21:22:55 2010        
(r215014)
@@ -105,6 +105,8 @@ int cvmx_helper_get_number_of_interfaces
 #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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to