⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 confignet.h

📁 powerPC866 系列平台BSP移植开发的参考代码
💻 H
字号:
/* configNet.h - network configuration header */

/* Copyright 1984-1999 Wind River Systems, Inc. */

/*
modification history
--------------------
01g,08feb01,lmk Added support for booting from FEC or CPM
01f,31mar99.dat SPR 25958, added #ifndef IP_MAX_UNITS
01e,18mar99,cn 	changed to use sysMotCpmEnd (SPR# 25839).
01d,08feb99,cn 	changes required by performance improvement (SPR# 24883).
01c,18nov98,cn 	changed motCmpEnd to motCpmEnd, CMP to CPM.
01b,09nov98,cn 	added support for ads860T's FEC.
01a,02jun98,cn 	written.

*/

#ifndef INCconfigNeth
#define INCconfigNeth

#include "vxWorks.h"
#include "end.h"

/* defines */

#define PHY_10BASE_T            0x00     /* 10 Base-T */
#define PHY_10BASE_T_FDX        0x01     /* 10 Base Tx, full duplex */
#define PHY_100BASE_TX          0x02     /* 100 Base Tx */
#define PHY_100BASE_TX_FDX      0x03     /* 100 Base TX, full duplex */
#define PHY_100BASE_T4          0x04     /* 100 Base T4 */

/* Add scc hdlc END defines by Jin */

#ifdef INCLUDE_SCC_HDLC
#define SCC_LOAD_FUNC	sunSccEndLoad
/* sunSccAddr:ivec:sccNum:txBdNum:rxBdNum:txBdBase:rxBdBase:bufBase */
/*
 * SCC load strings are not used with the rpx BSP
 */
#define SCC3_LOAD_STRING "0xfa200000:0x3c:0x3:0x10:0x10:0x2800:0x2900:-1"
#define SCC4_LOAD_STRING "0xfa200000:0x3b:0x4:0x10:0x10:0x2c00:0x2d00:-1"

IMPORT END_OBJ* SCC_LOAD_FUNC (char *, void*);
#endif /* INCLUDE_SCC_HDLC */


#ifdef INCLUDE_CPM

#define CPM_LOAD_FUNC	sysMotCpmEndLoad

/* motCpmAddr:ivec:sccNum:txBdNum:rxBdNum:txBdBase:rxBdBase:bufBase */

/*
 * CPM load strings are not used with the rpx BSP
 */

#define CPM_LOAD_STRING ""

IMPORT END_OBJ* CPM_LOAD_FUNC (char *, void*);

#endif /* INCLUDE_CPM */

#ifdef INCLUDE_MOT_FEC

/* Motorola Fast Ethernet Controller */

#define FEC_LOAD_FUNC	motFecEndLoad

/*
 * "<motCpmAddr>:<ivec>:<bufBase>:<bufSize>:<fifoTxBase>:<fifoRxBase>
 * :<tbdNum>:<rbdNum>:<phyAddr>:<isoPhyAddr>:<phyDefMode>:<userFlags>"
 */

#define FEC_LOAD_STRING	"0xfa200000:0x07:-1:0x0:-1:-1:0x40:0x30:0x0:0xff:2:0x2"

IMPORT END_OBJ* FEC_LOAD_FUNC (char *, void*);

/*
 * this table may be customized by the user to force a
 * particular order how different technology abilities may be
 * negotiated by the PHY.
 */

INT16 motFecPhyAnOrderTbl [] = {
			        PHY_100BASE_TX_FDX,   /* 100Base-T full duplex*/
			        PHY_100BASE_TX,       /* 100Base-T */
			        PHY_10BASE_T_FDX,     /* 10Base-T full duplex */
			        PHY_10BASE_T,         /* 10Base-T */
				-1                    /* Signal end of table */
			       };
#endif /* INCLUDE_MOT_FEC */

/* End Driver Table - used to configure the ether driver used by the BSP   */
/* NOTE: When both drivers are defined, the one listed first in the Driver */
/*       Table is used as the primary WDB connection interface. By default */
/*       this will be the 10mBit CPM interface. To use the 100mBit FEC as  */
/*       the primary, switch the order to list the MOT_FEC interface first */

END_TBL_ENTRY endDevTbl [] =
{
/* add SCC_LOAD_FUNC to the endDevTbl by Jin */
#if defined(INCLUDE_MOT_FEC) && defined(INCLUDE_SCC_HDLC)  
    { 0, SCC_LOAD_FUNC, SCC3_LOAD_STRING, 1, NULL, FALSE},
    { 1, SCC_LOAD_FUNC, SCC4_LOAD_STRING, 1, NULL, FALSE},
    { 0, FEC_LOAD_FUNC, FEC_LOAD_STRING, 1, NULL, FALSE},
#else
#ifdef defined(INCLUDE_MOT_FEC) && defined(INCLUDE_CPM)
    { 0, CPM_LOAD_FUNC, CPM_LOAD_STRING, 1, NULL, FALSE},
    { 0, FEC_LOAD_FUNC, FEC_LOAD_STRING, 1, NULL, FALSE},
#endif
#ifdef INCLUDE_MOT_FEC
    { 0, FEC_LOAD_FUNC, FEC_LOAD_STRING, 1, NULL, FALSE},
#endif /* INCLUDE_MOT_FEC */
#ifdef INCLUDE_CPM
    { 0, CPM_LOAD_FUNC, CPM_LOAD_STRING, 1, NULL, FALSE},
#endif /* INCLUDE_CPM */
#endif /* INCLUDE_MOT_FEC and INCLUDE_CPM */
    { 0, END_TBL_END, NULL, 0, NULL, FALSE},
};

/* max number of SENS ipAttachments we can have */

#ifndef IP_MAX_UNITS
#define IP_MAX_UNITS (NELEMENTS (endDevTbl) - 1)
#endif

#endif /* INCconfigNeth */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -