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

📄 enetloc.h

📁 Ibmstb02500 miniboot 源码
💻 H
字号:
/* openbios/arch/redwood5/enetloc.h, redbios *//*-----------------------------------------------------------------------------+||       This source code has been made available to you by IBM on an AS-IS|       basis.  Anyone receiving this source is licensed under IBM|       copyrights to use it in any way he or she deems fit, including|       copying it, modifying it, compiling it, and redistributing it either|       with or without modifications.  No license under IBM patents or|       patent applications is to be implied by the copyright license.||       Any user of this software should understand that IBM cannot provide|       technical support for this software and will not be responsible for|       any consequences resulting from the use of this software.||       Any person who transfers this source code or any derivative work|       must include the IBM copyright notice, this paragraph, and the|       preceding two paragraphs in the transferred software.||       COPYRIGHT   I B M   CORPORATION 1995|       LICENSED MATERIAL  -  PROGRAM PROPERTY OF I B M+-----------------------------------------------------------------------------*//*-----------------------------------------------------------------------------+||  File Name:   enetloc.h||  Function:    Architecture local dependent defines of enetlib.||  Author:      Jim Haller||  Change Activity-||  Date        Description of Change                                       BY|  ---------   ---------------------                                       ---|  13-Feb-01   Rewrite/Port to Redwood V / Pallas/ SMSC LAN91C1111         jfh|  13-Aug-01   ********* SMSC LAN91C111 ******************************     jfh|  13-Aug-01   Complete rewrite for SMSC 91111 for Redwood V/Pallas        jfh|  30-Dec-01   Splitted from common include headers                        YYD|+-----------------------------------------------------------------------------*/struct net_device_stats {        unsigned long   rx_packets;             /* total packets received       */        unsigned long   tx_packets;             /* total packets transmitted    */        unsigned long   rx_bytes;               /* total bytes received         */        unsigned long   tx_bytes;               /* total bytes transmitted      */        unsigned long   rx_errors;              /* bad packets received         */        unsigned long   tx_errors;              /* packet transmit problems     */        unsigned long   rx_dropped;             /* no space in linux buffers    */        unsigned long   tx_dropped;             /* no space available in linux  */        unsigned long   multicast;              /* multicast packets received   */        unsigned long   collisions;        /* detailed rx_errors: */        unsigned long   rx_length_errors;        unsigned long   rx_over_errors;         /* receiver ring buff overflow  */        unsigned long   rx_crc_errors;          /* recved pkt with crc error    */        unsigned long   rx_frame_errors;        /* recv'd frame alignment error */        unsigned long   rx_fifo_errors;         /* recv'r fifo overrun          */        unsigned long   rx_missed_errors;       /* receiver missed packet       */        /* detailed tx_errors */        unsigned long   tx_aborted_errors;        unsigned long   tx_carrier_errors;        unsigned long   tx_fifo_errors;        unsigned long   tx_heartbeat_errors;        unsigned long   tx_window_errors;        /* for cslip etc */        unsigned long   rx_compressed;        unsigned long   tx_compressed;};struct enet_device {        char                    name[9];        unsigned long           base_addr;        unsigned int            irq;        unsigned int            interrupt;        unsigned char           dev_addr[6];        unsigned char           dma;        unsigned int            tbusy;        unsigned int            start;/////// void                    *priv;  /* pointer to private data */   struct       net_device_stats stats;   int          packets_waiting;   int          autoneg_active;   unsigned int phyaddr;   unsigned int phytype;   unsigned int lastPhy18;   unsigned int tcr_cur_mode;   unsigned int rcr_cur_mode;   unsigned int rpc_cur_mode;   char         ctl_info[1024];   int          ctl_swfdup;   int          ctl_ephloop;   int          ctl_miiop;   int          ctl_autoneg;   int          ctl_rfduplx;   int          ctl_rspeed;   int          ctl_afduplx;   int          ctl_aspeed;   int          ctl_lnkfail;   int          ctl_forcol;   int          ctl_filtcar;   int          ctl_freemem;   int          ctl_totmem;   int          ctl_leda;   int          ctl_ledb;   int          ctl_chiprev;        unsigned long           trans_start;        int                     (*open)(struct enet_device *dev);        int                     (*stop)(struct enet_device *dev);        struct net_device_stats* (*get_stats)(struct enet_device *dev);        void                     (*set_multicast_list)(struct enet_device *dev);};static const char * chip_ids[ 15 ] =  {        NULL, NULL, NULL,        /* 3 */ "SMC91C90/91C92",        /* 4 */ "SMC91C94",        /* 5 */ "SMC91C95",        /* 6 */ "SMC91C96",        /* 7 */ "SMC91C100",        /* 8 */ "SMC91C100FD",        /* 9 */ "SMC91C11xFD",        NULL, NULL,        NULL, NULL, NULL};#define ENET_IO_ADDR          0x72000300// Data Register/* BANK 2 */#define DATA_REG        0x0004#define DM9KS_DWORD_MODE	1#define DM9KS_BYTE_MODE		2#define DM9KS_WORD_MODE		0#define DM9KS_VID_L		0x28#define DM9KS_VID_H		0x29#define DM9KS_PID_L		0x2A#define DM9KS_PID_H		0x2B#define DM9KS_GPR		0x1f    /* General purpose register */#define DM9KS_TCR2		0x2d#define DM9KS_NCR		0x00	/* Network control Reg.*/#define DM9KS_NSR		0x01	/* Network Status Reg.*/#define DM9KS_TCR		0x02	/* TX control Reg.*/#define DM9KS_RXCR		0x05	/* RX control Reg.*/#define DM9KS_BPTR		0x08#define DM9KS_EPCR		0x0b#define DM9KS_EPAR		0x0c#define DM9KS_EPDRL		0x0d#define DM9KS_EPDRH		0x0e#define DM9KS_SMCR		0x2f 	/* Special Mode Control Reg.*/#define DM9KS_ETXCSR		0x30	/* Early Transmit control/status Reg.*/#define	DM9KS_TCCR		0x31	/* Checksum cntrol Reg. */#define DM9KS_RCSR		0x32	/* Receive Checksum status Reg.*/#define DM9KS_MRCMDX		0xf0#define DM9KS_MRCMD		0xf2#define DM9KS_MDRAH		0xf4#define DM9KS_MDRAL		0xf5#define DM9KS_MWCMD		0xf8#define DM9KS_TXPLL		0xfc#define DM9KS_TXPLH		0xfd#define DM9KS_ISR		0xfe#define DM9KS_IMR		0xff/*---------------------------------------------*/#define DM9KS_REG05		0x30	/* SKIP_CRC/SKIP_LONG */ #define DM9KS_REGFF		0x83	/* IMR */#define DM9KS_DISINTR		0x80#define DM9KS_PHY		0x40	/* PHY address 0x01 */#define DM9KS_PKT_RDY		0x01	/* Packet ready to receive */#define DM9KS_RX_INTR		0x01#define DM9KS_TX_INTR		0x02#define DM9KS_DWORD_MODE	1#define DM9KS_BYTE_MODE		2#define DM9KS_WORD_MODE		0#define TRUE			1#define FALSE			0#define DM9KS_10MHD             0#define DM9KS_100MHD            1#define DM9KS_10MFD             4#define DM9KS_100MFD            5#define DM9KS_AUTO              8

⌨️ 快捷键说明

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