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

📄 sn83932end.h

📁 IXP425的BSP代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* if_sn.h - structures and defines for the DP83932B SONIC device *//* Copyright 1991-1992 Wind River Systems, Inc. *//*modification history--------------------01k,20sep97,pul  added # defines for  new MBLK buffering scheme01j,15Apr97,sal  Addop for End Driver01h,18oct93,cd   added extra field to TX_DESC to hold associated mbuf,		 defined EXBUS, added timer support.01g,22sep92,rrr  added support for c++01f,04jun92,ajm  defined appropriate regs volatile01e,26may92,rrr  the tree shuffle01d,03feb92,rfs  minor changes to TX_DESC, moved tunables out to driver01c,08nov91,rfs  adapted from Ironics stuff01b,29jul91,kjl  cleanup in preparation for release01a,25mar91,kjl  adapted from if_ln.h 01j,05oct90,shl*/#ifndef __INCif_snh#define __INCif_snh#ifdef __cplusplusextern "C" {#endif#if ((CPU_FAMILY==I960) && (defined __GNUC__))#pragma align 1                 /* tell gcc960 not to optimize alignments */#endif  /* CPU_FAMILY==I960 *//* Total number of cluster pools */#define NUM_CLUSTER_POOLS 2/* Configurable number of clusters of each type */#define NUM_OPTIMAL_CLUSTER 32#define NUM_MTU_CLUSTER 16/* Configurable number of cluster blks and mblks */#define NUM_CL_BLK 32#define NUM_MBLK 32/* Tunable Parameters */#define NUM_RRA_DESC  (4)             /* number of RRA descriptors */#define NUM_RX_DESC   (512)           /* number of Rx descriptors */#define NUM_TX_DESC   (64)            /* num of Tx desc, must be power of 2 */#define MAX_TX_FRAGS  (32)            /* max transmit frags to support *//* The following values denote the maximum # of RX/TX events to process * in one pass (ie. Process up to x received packets before processing up * to y transmitted packets. */#define RX_PROCESS_FLOW	    16	 #define TX_PROCESS_FLOW	    8/* DATA STRUCTURES */typedef struct rra_desc                    /* Receive Resource Descriptor */    {    unsigned long buff_ptr0;     /* these two point to the starting location */    unsigned long buff_ptr1;     /* of the receive buffer arear (RBA) */    unsigned long buff_wc0;      /* these two define the number of 16 bit */    unsigned long buff_wc1;      /* words that the RBA occupies */    } RRA_DESC;#define RRA_DESC_SIZ  sizeof(RRA_DESC)#define RRA_SIZE    (NUM_RRA_DESC * RRA_DESC_SIZ)      /* size of area */typedef struct Rx_desc                           /* Receive Descriptor */    {    unsigned long status;    /* indicates the status of the received packet */    unsigned long byte_count;/* length of the complete packet */     unsigned long pkt_ptr0;  /* these two pointers locate the */    unsigned long pkt_ptr1;  /* packet in the RBA */    unsigned long seq_no;    /* displays the sequence the RBAs used and the */			     /* packets buffered */    struct Rx_desc *link;    /* location of the next receive descriptor */    unsigned long in_use;    /* ownership of the descriptor */			     /* zero value: driver (system) is the owner */		             /* non -zero value: SONIC (device) is the owner */    } RX_DESC;#define RX_DESC_SIZ  sizeof(RX_DESC)#define RDA_SIZE    (NUM_RX_DESC * RX_DESC_SIZ)             /* Total Bytes *//* values for in_use field */#define IN_USE      (1)				/*SL*  In use by the device */#define NOT_IN_USE  (0)				/*SL*  Free to manipulate *//* end-of-list marker for link field */#define RX_EOL      (RX_DESC *)(1)#define CAM_COUNT   (16)typedef struct Cam_desc    {    unsigned long cep;    unsigned long cap0;    unsigned long cap1;    unsigned long cap2;    } CAM_DESC;#define CAM_DESC_SIZE  sizeof (CAM_DESC)/* Define size of CAM descriptor area plus a word for the CAM enable */#define CAM_SIZE (CAM_COUNT * CAM_DESC_SIZE) + 4typedef struct frag_desc    {    unsigned long frag_ptr0;        /* 0,1 pointer to the fragment in */    unsigned long frag_ptr1;        /* the  transmit buffer area */    unsigned long frag_size;        /* byte count of the fragment */    } FRAG_DESC;          /* Fragment descriptors */typedef struct Tx_desc                  /* Transmit Descriptor */    {    unsigned long status;               /* status of the transmission */ 					/* written into transmit control */					/* register (TCR) */              unsigned long config;               /* programming SONIC to various */					/* transmiting modes */    unsigned long pkt_size;             /* byte count of the packet */    unsigned long frag_count;           /* number of fragments of the packet */    FRAG_DESC frag[MAX_TX_FRAGS]; 		/*  max Fragment descriptors */    struct Tx_desc *pLink;		/* OUR real link ptr */    unsigned long flag;			/* IN USE flag */    unsigned long number;		/* Descriptor number */    } TX_DESC;    #define TX_DESC_SIZ  sizeof(TX_DESC)#define TDA_SIZE    (NUM_TX_DESC * TX_DESC_SIZ)/* end-of-list marker for link field */#define TX_EOL      (1)/* State Definitions */#define SN_POLLING        0x01          /* Poll Mode */#define SN_PROMISC        0x02          /* Promicuous Mode */#define SN_ALLMULTI       0x04          /* Allow all multicasts */#define SN_RECLAIMING     0x80          /* Performing a Reclaim of TXDs *//* SONIC registers, defined as data structure */typedef struct sonic    {    volatile unsigned long cr;    volatile unsigned long dcr;    volatile unsigned long rcr;    volatile unsigned long tcr;    volatile unsigned long imr;    volatile unsigned long isr;    volatile unsigned long utda;    volatile unsigned long ctda;    volatile unsigned long fill_20;    volatile unsigned long fill_24;    volatile unsigned long fill_28;    volatile unsigned long fill_2c;    volatile unsigned long fill_30;    volatile unsigned long urda;    volatile unsigned long crda;    volatile unsigned long fill_3c;    volatile unsigned long fill_40;    volatile unsigned long fill_44;    volatile unsigned long fill_48;    volatile unsigned long eobc;    volatile unsigned long urra;    volatile unsigned long rsa;    volatile unsigned long rea;    volatile unsigned long rrp;    volatile unsigned long rwp;    volatile unsigned long fill_64;    volatile unsigned long fill_68;    volatile unsigned long fill_6c;    volatile unsigned long fill_70;    volatile unsigned long fill_74;    volatile unsigned long fill_78;    volatile unsigned long fill_7c;    volatile unsigned long fill_80;    volatile unsigned long cep;    volatile unsigned long cap2;    volatile unsigned long cap1;    volatile unsigned long cap0;    volatile unsigned long ce;    volatile unsigned long cdp;    volatile unsigned long cdc;    volatile unsigned long sr;    volatile unsigned long wt0;    volatile unsigned long wt1;    volatile unsigned long rsc;    volatile unsigned long fill_b0;    volatile unsigned long fill_b4;    volatile unsigned long fill_b8;

⌨️ 快捷键说明

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