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

📄 cs8900a.h.svn-base

📁 usb drivers based on s3c2410
💻 SVN-BASE
字号:
#ifndef CS8900A_H
#define CS8900A_H

#include "board.h"

#define RTdata     	REGW(CS8900_BASE, 0x00)/*rw*/
#define TxCMD      	REGW(CS8900_BASE, 0x04)/*wo*/
#define TxLength   	REGW(CS8900_BASE, 0x06)/*wo*/
#define ISQ        	REGW(CS8900_BASE, 0x08)/*ro*/
#define PPP        	REGW(CS8900_BASE, 0x0a)/*rw*/
#define PPdata     	REGW(CS8900_BASE, 0x0c)/*rw*/

/**** Transmit Configuration ****/
#define PP_TxCFG     					0x0106 
#define TxCFG_Loss_of_CRSiE		(1<<6)
#define TxCFG_SQErroriE       (1<<7)
#define TxCFG_TxOKiE      		(1<<8) 
#define TxCFG_Out_of_windowiE	(1<<9) 
#define TxCFG_JabberiE     		(1<<10)  
#define TxCFG_AnycolliE  			(1<<11)  
#define TxCFG_T16colliE  			(1<<15)  
 
/**** Transmit event ****/
#define PP_TxEvent       			0x0128 
#define TxEvent_Loss_of_CRS		(1<<6)
#define TxEvent_SQEerror			(1<<7)
#define TxEvent_TxOK          (1<<8)
#define TxEvent_Out_of_window	(1<<9)
#define TxEvent_Jabber        (1<<10)
#define TxEvent_NumCollisions	(0xf<<11)
#define TxEvent_T16Collisions	(1<<15)

/***** Transmit Command Request****/
#define PP_TxCmd_Req			0x0144

/**** Transmit Command Status ****/
#define PP_TxCMD_Sta    	0x0108
#define TxStart_After5   	0x0
#define TxStart_After381	(1<<6)  
#define TxStart_After1021	(1<<7)  
#define TxStart_All				(3<<6)
#define TxCMD_Force				(1<<8)
#define TxCMD_Onecoll			(1<<9)
#define TxCMD_InhibitCRC	(1<<12)  
#define TxCMD_TxpadDis		(1<<13) 

/**** Buffer Configuration ****/
#define PP_BufCFG    				0x010A  
#define BufCFG_SWint_X			(1<<6)
#define BufCFG_RxDMAiE			(1<<7)
#define BufCFG_Rdy4TxiE			(1<<8)
#define BufCFG_TxUnderruniE	(1<<9)
#define BufCFG_RxMissiE			(1<<10)
#define BufCFG_Rx128iE      (1<<11)
#define BufCFG_TxColOvfiE   (1<<12)
#define BufCFG_MissOvfloiE	(1<<13)
#define BufCFG_RxDestiE     (1<<15)

/**** Buffer event ****/
#define PP_BufEvent 				0x012C 
#define BufEvent_SWint      (1<<6)
#define BufEvent_RxDMAFrame	(1<<7)
#define BufEvent_Rdy4Tx			(1<<8)
#define BufEvent_TxUnderrun	(1<<9)
#define BufEvent_RxMiss 		(1<<10)
#define BufEvent_Rx128			(1<<11)
#define BufEvent_RxDest			(1<<15)

/**** Line Control ****/
#define PP_LineCTL						0x0112  
#define LineCTL_SerRxON				(1<<6)
#define LineCTL_SerTxON				(1<<7)
#define LineCTL_AUIonly				(1<<8)
#define LineCTL_AutoAUI_10BT 	(1<<9)
#define LineCTL_ModBackoffE 	(1<<11)
#define LineCTL_PolarityDis 	(1<<12)
#define LineCTL_L2_partDefDis (1<<13)
#define LineCTL_LoRxSquelch 	(1<<14)

/**** Receiver configuration ****/
#define PP_RxCFG					0x0102             
#define RxCFG_Skip_1			(1<<6)  
#define RxCFG_StreamE			(1<<7)  
#define RxCFG_RxOKiE			(1<<8) 
#define RxCFG_RxDMAonly		(1<<9)  
#define RxCFG_AutoRxDMAE	(1<<10)  
#define RxCFG_BufferCRC		(1<<11)  
#define RxCFG_CRCerroriE	(1<<12)  
#define RxCFG_RuntiE			(1<<13) 
#define RxCFG_ExtradataiE (1<<14)  

/**** Receiver Control ****/
#define PP_RxCTL     				0x0104  
#define RxCTL_IAHashA				(1<<6)  
#define RxCTL_PromiscuousA	(1<<7)  
#define RxCTL_RxOKA					(1<<8)  
#define RxCTL_MulticastA		(1<<9) 
#define RxCTL_IndividualA   (1<<10) 
#define RxCTL_BroadcastA		(1<<11)   
#define RxCTL_CRCerrorA			(1<<12)  
#define RxCTL_RuntA					(1<<13)  
#define RxCTL_ExtradataA		(1<<14) 

/****Receive Event****/
#define RxEvent				0x0124
#define IAHash				(1<<6)
#define Dribbblebits 	(1<<7)
#define RxOK 					(1<< 8)
#define Hashed				(1<< 9)
#define IndividualAdr	(1<<1)
#define Broadcast 		(1<<11)
#define CRCerror			(1<<12)
#define Runt 					(1<<13)
#define Extradata			(1<<14)

/**** Bus status ****/
#define PP_BusST				0x0138  
#define BusST_TxBidErr	(1<<7)
#define BusST_Rdy4Tx		(1<<8)

/**** Bus Control ****/
#define PP_BusCTL						0x0116 
#define BusCTL_ResetRxDMA		(1<<6)
#define BusCTL_DMAextend		(1<<8)
#define BusCTL_UseSA				(1<<9)
#define BusCTL_MemoryE			(1<<10)
#define BusCTL_DMABurst			(1<<11)
#define BusCTL_IOCHRDYE			(1<<12)
#define BusCTL_RxDMAsize		(1<<13)
#define BusCTL_EnableRQ			(1<<15)

/**** Chip self status ****/
#define PP_SelfSTAT  					0x0136  
#define SelfST_T3VActive  		(1<<6)
#define SelfST_INITD      		(1<<7)
#define SelfST_SIBUSY      		(1<<8)
#define SelfST_EEPROMpresent	(1<<9)
#define SelfST_EEPROMOK  			(1<<10)
#define SelfST_ELpresent  		(1<<11)
#define SelfST_EEsize     		(1<<12)

/**** Self Control ****/
#define PP_SelfCTL   					0x0114  
#define SelfCTL_RESET					(1<<6)
#define SelfCTL_SWSuspend   	(1<<8)
#define SelfCTL_HWSleepE			(1<<9)
#define SelfCTL_HWStandbyE  	(1<<10)
#define SelfCTL_HC0E        	(1<<12)
#define SelfCTL_HC1E        	(1<<13)
#define SelfCTL_HCB0        	(1<<14)
#define SelfCTL_HCB1        	(1<<15)

/***** Receive event ****/
#define PP_RER       	0x0124  
#define RER_IAHash		(1<<6)
#define RER_Dribble		(1<<7)
#define RER_RxOK      (1<<8)
#define RER_Hashed    (1<<9)
#define RER_IA				(1<<10)
#define RER_Broadcast (1<<11)
#define RER_CRC       (1<<12)
#define RER_RUNT      (1<<13)
#define RER_EXTRA     (1<<14)

/*****  Interrupt Status Queue  ****/
#define PP_ISQ       		0x0120
#define ISQ_RxEvent			0x04
#define ISQ_TxEvent			0x08
#define ISQ_BufEvent		0x0C
#define ISQ_RxMissEvent	0x10
#define ISQ_TxColEvent	0x12
#define ISQ_EventMask		0x3F

/***** Line Status ****/
#define PP_LineST    			0x0134
#define LineST_LinkOK			(1<<7)
#define LineST_AUI				(1<<8)
#define LineST_10BT				(1<<9)
#define LineST_PolarityOK	(1<<12)
#define LineST_CRS				(1<<14)

/***** Test control ****/
#define PP_TestCTL   				0x0118 
#define TestCTL_DisableLT		(1<<7)
#define TestCTL_ENDECloop  	(1<<9)
#define TestCTL_AUIloop     (1<<10)
#define TestCTL_DisBackoff  (1<<11)
#define TestCTL_FDX         (1<<15)

/***** Interrupt Number ****/
#define PP_IntRegNum    		0x0022             
#define IntRegNum_INTRQ0		0x0000
#define IntRegNum_INTRQ1		0x0001   
#define IntRegNum_INTRQ2		0x0002   
#define IntRegNum_INTRQ3		0x0003  

/***** Product Identification Code ******/
#define PP_ChipID    0x0000
#define PP_ChipRev   0x0002

//***** I/O Base Address *****/
#define PP_IOBASE    0x0020      
 
/***** Receiver miss counter *****/
#define PP_RxMiss    0x0130  

/***** AUI Time Domain Reflectometer *****/
#define PP_TDR       0x013C  

/***** Tx Length *****/
#define PP_TxLength  0x0146  

/***** Logical address filter *****/
#define PP_LAF       0x0150  

/***** Individual address (MAC) *****/
#define PP_IA        0x0158  

/******Transmit Collision Counter****/
#define PP_TxCOL		 0x0132

/*******Receive Frame Byte Counter*****/
#define FrameBCounter	0x0050


#endif //CS8900A_H

⌨️ 快捷键说明

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