From owner-svn-src-user@FreeBSD.ORG Thu Apr 29 07:07:44 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15402106564A; Thu, 29 Apr 2010 07:07:44 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04CF58FC0A; Thu, 29 Apr 2010 07:07:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3T77h86053506; Thu, 29 Apr 2010 07:07:43 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3T77hDx053503; Thu, 29 Apr 2010 07:07:43 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004290707.o3T77hDx053503@svn.freebsd.org> From: Juli Mallett Date: Thu, 29 Apr 2010 07:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207357 - user/jmallett/octeon/sys/contrib/octeon-sdk X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2010 07:07:44 -0000 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