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

📄 xmac_ii.h

📁 优龙2410linux2.6.8内核源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
#define PHY_L_LC_LEDR		(3<<12)	/* Bit 13..12:	Rx/Blink/On/Off */#define PHY_L_LC_LEDT		(3<<10)	/* Bit 11..10:	Tx/Blink/On/Off */#define PHY_L_LC_LEDG		(3<<8)	/* Bit  9..8:	Giga/Blink/On/Off */#define PHY_L_LC_LEDS		(3<<6)	/* Bit  7..6:	10-100/Blink/On/Off */#define PHY_L_LC_LEDL		(3<<4)	/* Bit  5..4:	Link/Blink/On/Off */#define PHY_L_LC_LEDF		(3<<2)	/* Bit  3..2:	Duplex/Blink/On/Off */#define PHY_L_LC_PSTRECH	(1<<1)	/* Bit  1:	Strech LED Pulses */#define PHY_L_LC_FREQ		(1<<0)	/* Bit  0:	30/100 ms *//*****  PHY_LONE_PORT_CTRL	16 bit r/w	Port Control Reg *****/#define PHY_L_PC_TX_TCLK	(1<<15)	/* Bit 15:	Enable TX_TCLK */									/* Bit 14:	reserved */#define PHY_L_PC_ALT_NP		(1<<13)	/* Bit 14:	Alternate Next Page */#define PHY_L_PC_GMII_ALT	(1<<12)	/* Bit 13:	Alternate GMII driver */									/* Bit 11:	reserved */#define PHY_L_PC_TEN_CRS	(1<<10)	/* Bit 10:	Extend CRS*/									/* Bit  9..0:	not described *//*****  PHY_LONE_CIM		16 bit r/o	CIM Reg *****/#define PHY_L_CIM_ISOL		(255<<8)/* Bit 15..8:	Isolate Count */#define PHY_L_CIM_FALSE_CAR	(255<<0)/* Bit  7..0:	False Carrier Count *//* * Pause Bits (PHY_L_AN_ASP and PHY_L_AN_PC) encoding */#define PHY_L_P_NO_PAUSE	(0<<10)	/* Bit 11..10:	no Pause Mode */#define PHY_L_P_SYM_MD		(1<<10)	/* Bit 11..10:	symmetric Pause Mode */#define PHY_L_P_ASYM_MD		(2<<10)	/* Bit 11..10:	asymmetric Pause Mode */#define PHY_L_P_BOTH_MD		(3<<10)	/* Bit 11..10:	both Pause Mode *//* * National-Specific *//*****  PHY_NAT_1000T_CTRL	16 bit r/w	1000Base-T Control Reg *****/#define PHY_N_1000C_TEST	(7<<13)	/* Bit 15..13:	Test Modes */#define PHY_N_1000C_MSE		(1<<12)	/* Bit 12:	Master/Slave Enable */#define PHY_N_1000C_MSC		(1<<11)	/* Bit 11:	M/S Configuration */#define PHY_N_1000C_RD		(1<<10)	/* Bit 10:	Repeater/DTE */#define PHY_N_1000C_AFD		(1<<9)	/* Bit  9:	Advertise Full Duplex */#define PHY_N_1000C_AHD		(1<<8)	/* Bit  8:	Advertise Half Duplex */#define PHY_N_1000C_APC		(1<<7)	/* Bit  7:	Asymmetric Pause Cap. */									/* Bit  6..0:	reserved *//*****  PHY_NAT_1000T_STAT	16 bit r/o	1000Base-T Status Reg *****/#define PHY_N_1000S_MSF		(1<<15)	/* Bit 15:	Master/Slave Fault */#define PHY_N_1000S_MSR		(1<<14)	/* Bit 14:	Master/Slave Result */#define PHY_N_1000S_LRS		(1<<13)	/* Bit 13:	Local Receiver Status */#define PHY_N_1000S_RRS		(1<<12)	/* Bit 12:	Remote Receiver Status*/#define PHY_N_1000S_LP_FD	(1<<11)	/* Bit 11:	Link Partner can FD */#define PHY_N_1000S_LP_HD	(1<<10)	/* Bit 10:	Link Partner can HD */#define PHY_N_1000C_LP_APC	(1<<9)	/* Bit  9:	LP Asym. Pause Cap. */									/* Bit  8:	reserved */#define PHY_N_1000S_IEC		0xff	/* Bit  7..0:	Idle Error Count *//*****  PHY_NAT_EXT_STAT	16 bit r/o	Extended Status Register *****/#define PHY_N_ES_X_FD_CAP	(1<<15)	/* Bit 15:	1000Base-X FD capable */#define PHY_N_ES_X_HD_CAP	(1<<14)	/* Bit 14:	1000Base-X HD capable */#define PHY_N_ES_T_FD_CAP	(1<<13)	/* Bit 13:	1000Base-T FD capable */#define PHY_N_ES_T_HD_CAP	(1<<12)	/* Bit 12:	1000Base-T HD capable */									/* Bit 11..0:	reserved *//* todo: those are still missing *//*****  PHY_NAT_EXT_CTRL1	16 bit r/o	Extended Control Reg1 *****//*****  PHY_NAT_Q_STAT1		16 bit r/o	Quick Status Reg1 *****//*****  PHY_NAT_10B_OP		16 bit r/o	10Base-T Operations Reg *****//*****  PHY_NAT_EXT_CTRL2	16 bit r/o	Extended Control Reg1 *****//*****  PHY_NAT_Q_STAT2		16 bit r/o	Quick Status Reg2 *****//*****  PHY_NAT_PHY_ADDR	16 bit r/o	PHY Address Register *****//* * Marvell-Specific *//*****  PHY_MARV_AUNE_ADV	16 bit r/w	Auto-Negotiation Advertisement *****//*****  PHY_MARV_AUNE_LP	16 bit r/w	Link Part Ability Reg *****/#define PHY_M_AN_NXT_PG		BIT_15	/* Request Next Page */#define PHY_M_AN_ACK		BIT_14	/* (ro)	Acknowledge Received */#define PHY_M_AN_RF			BIT_13	/* Remote Fault */									/* Bit 12:	reserved */#define PHY_M_AN_ASP		BIT_11	/* Asymmetric Pause */#define PHY_M_AN_PC			BIT_10	/* MAC Pause implemented */#define PHY_M_AN_100_FD		BIT_8	/* Advertise 100Base-TX Full Duplex */#define PHY_M_AN_100_HD		BIT_7	/* Advertise 100Base-TX Half Duplex */#define PHY_M_AN_10_FD		BIT_6	/* Advertise 10Base-TX Full Duplex */#define PHY_M_AN_10_HD		BIT_5	/* Advertise 10Base-TX Half Duplex *//* special defines for FIBER (88E1011S only) */#define PHY_M_AN_ASP_X		BIT_8	/* Asymmetric Pause */#define PHY_M_AN_PC_X		BIT_7	/* MAC Pause implemented */#define PHY_M_AN_1000X_AHD	BIT_6	/* Advertise 10000Base-X Half Duplex */#define PHY_M_AN_1000X_AFD	BIT_5	/* Advertise 10000Base-X Full Duplex *//* Pause Bits (PHY_M_AN_ASP_X and PHY_M_AN_PC_X) encoding */#define PHY_M_P_NO_PAUSE_X	(0<<7)	/* Bit  8.. 7:	no Pause Mode */#define PHY_M_P_SYM_MD_X	(1<<7)	/* Bit  8.. 7:	symmetric Pause Mode */#define PHY_M_P_ASYM_MD_X	(2<<7)	/* Bit  8.. 7:	asymmetric Pause Mode */#define PHY_M_P_BOTH_MD_X	(3<<7)	/* Bit  8.. 7:	both Pause Mode *//*****  PHY_MARV_1000T_CTRL	16 bit r/w	1000Base-T Control Reg *****/#define PHY_M_1000C_TEST	(7<<13)	/* Bit 15..13:	Test Modes */#define PHY_M_1000C_MSE		(1<<12)	/* Bit 12:	Manual Master/Slave Enable */#define PHY_M_1000C_MSC		(1<<11)	/* Bit 11:	M/S Configuration (1=Master) */#define PHY_M_1000C_MPD		(1<<10)	/* Bit 10:	Multi-Port Device */#define PHY_M_1000C_AFD		(1<<9)	/* Bit  9:	Advertise Full Duplex */#define PHY_M_1000C_AHD		(1<<8)	/* Bit  8:	Advertise Half Duplex */									/* Bit  7..0:	reserved *//*****  PHY_MARV_PHY_CTRL	16 bit r/w	PHY Specific Ctrl Reg *****/#define PHY_M_PC_TX_FFD_MSK	(3<<14)	/* Bit 15..14:	Tx FIFO Depth Mask */#define PHY_M_PC_RX_FFD_MSK	(3<<12)	/* Bit 13..12:	Rx FIFO Depth Mask */#define PHY_M_PC_ASS_CRS_TX	(1<<11)	/* Bit 11:	Assert CRS on Transmit */#define PHY_M_PC_FL_GOOD	(1<<10)	/* Bit 10:	Force Link Good */#define PHY_M_PC_EN_DET_MSK	(3<<8)	/* Bit  9.. 8:	Energy Detect Mask */#define PHY_M_PC_ENA_EXT_D	(1<<7)	/* Bit  7:	Enable Ext. Distance (10BT) */#define PHY_M_PC_MDIX_MSK	(3<<5)	/* Bit  6.. 5:	MDI/MDIX Config. Mask */#define PHY_M_PC_DIS_125CLK	(1<<4)	/* Bit  4:	Disable 125 CLK */#define PHY_M_PC_MAC_POW_UP	(1<<3)	/* Bit  3:	MAC Power up */#define PHY_M_PC_SQE_T_ENA	(1<<2)	/* Bit  2:	SQE Test Enabled */#define PHY_M_PC_POL_R_DIS	(1<<1)	/* Bit  1:	Polarity Reversal Disabled */#define PHY_M_PC_DIS_JABBER	(1<<0)	/* Bit  0:	Disable Jabber */#define PHY_M_PC_EN_DET			SHIFT8(2)	/* Energy Detect (Mode 1) */#define PHY_M_PC_EN_DET_PLUS	SHIFT8(3)	/* Energy Detect Plus (Mode 2) */#define PHY_M_PC_MDI_XMODE(x)	SHIFT5(x)	#define PHY_M_PC_MAN_MDI	0    	/* 00 = Manual MDI configuration */#define PHY_M_PC_MAN_MDIX	1		/* 01 = Manual MDIX configuration */#define PHY_M_PC_ENA_AUTO	3		/* 11 = Enable Automatic Crossover *//*****  PHY_MARV_PHY_STAT	16 bit r/o	PHY Specific Status Reg *****/#define PHY_M_PS_SPEED_MSK	(3<<14)	/* Bit 15..14:	Speed Mask */#define PHY_M_PS_SPEED_1000	(1<<15)	/*       10 = 1000 Mbps */#define PHY_M_PS_SPEED_100	(1<<14)	/*       01 =  100 Mbps */#define PHY_M_PS_SPEED_10	0		/*       00 =   10 Mbps */#define PHY_M_PS_FULL_DUP	(1<<13)	/* Bit 13:	Full Duplex */#define PHY_M_PS_PAGE_REC	(1<<12)	/* Bit 12:	Page Received */#define PHY_M_PS_SPDUP_RES	(1<<11)	/* Bit 11:	Speed & Duplex Resolved */#define PHY_M_PS_LINK_UP	(1<<10)	/* Bit 10:	Link Up */#define PHY_M_PS_CABLE_MSK	(3<<7)	/* Bit  9.. 7:	Cable Length Mask */#define PHY_M_PS_MDI_X_STAT	(1<<6)	/* Bit  6:	MDI Crossover Stat (1=MDIX) */#define PHY_M_PS_DOWNS_STAT	(1<<5)	/* Bit  5:	Downshift Status (1=downsh.) */#define PHY_M_PS_ENDET_STAT	(1<<4)	/* Bit  4:	Energy Detect Status (1=act) */#define PHY_M_PS_TX_P_EN	(1<<3)	/* Bit  3:	Tx Pause Enabled */#define PHY_M_PS_RX_P_EN	(1<<2)	/* Bit  2:	Rx Pause Enabled */#define PHY_M_PS_POL_REV	(1<<1)	/* Bit  1:	Polarity Reversed */#define PHY_M_PC_JABBER		(1<<0)	/* Bit  0:	Jabber */#define PHY_M_PS_PAUSE_MSK	(PHY_M_PS_TX_P_EN | PHY_M_PS_RX_P_EN)/*****  PHY_MARV_INT_MASK	16 bit r/w	Interrupt Mask Reg *****//*****  PHY_MARV_INT_STAT	16 bit r/o	Interrupt Status Reg *****/#define PHY_M_IS_AN_ERROR	(1<<15)	/* Bit 15:	Auto-Negotiation Error */#define PHY_M_IS_LSP_CHANGE	(1<<14)	/* Bit 14:	Link Speed Changed */#define PHY_M_IS_DUP_CHANGE	(1<<13)	/* Bit 13:	Duplex Mode Changed */#define PHY_M_IS_AN_PR		(1<<12)	/* Bit 12:	Page Received */#define PHY_M_IS_AN_COMPL	(1<<11)	/* Bit 11:	Auto-Negotiation Completed */#define PHY_M_IS_LST_CHANGE	(1<<10)	/* Bit 10:	Link Status Changed */#define PHY_M_IS_SYMB_ERROR	(1<<9)	/* Bit  9:	Symbol Error */#define PHY_M_IS_FALSE_CARR	(1<<8)	/* Bit  8:	False Carrier */#define PHY_M_IS_FIFO_ERROR	(1<<7)	/* Bit  7:	FIFO Overflow/Underrun Error */#define PHY_M_IS_MDI_CHANGE	(1<<6)	/* Bit  6:	MDI Crossover Changed */#define PHY_M_IS_DOWNSH_DET	(1<<5)	/* Bit  5:	Downshift Detected */#define PHY_M_IS_END_CHANGE	(1<<4)	/* Bit  4:	Energy Detect Changed */									/* Bit  3..2:	reserved */#define PHY_M_IS_POL_CHANGE	(1<<1)	/* Bit  1:	Polarity Changed */#define PHY_M_IS_JABBER		(1<<0)	/* Bit  0:	Jabber */#define PHY_M_DEF_MSK		(PHY_M_IS_AN_ERROR | PHY_M_IS_AN_PR | \							PHY_M_IS_LST_CHANGE | PHY_M_IS_FIFO_ERROR)/*****  PHY_MARV_EXT_CTRL	16 bit r/w	Ext. PHY Specific Ctrl *****/#define PHY_M_EC_M_DSC_MSK	(3<<10)	/* Bit 11..10:	Master downshift counter */#define PHY_M_EC_S_DSC_MSK	(3<<8)	/* Bit  9.. 8:	Slave  downshift counter */#define PHY_M_EC_MAC_S_MSK	(7<<4)	/* Bit  6.. 4:	Def. MAC interface speed */#define PHY_M_EC_FIB_AN_ENA	(1<<3)	/* Bit  3:	Fiber Auto-Neg. Enable */#define PHY_M_EC_M_DSC(x)		SHIFT10(x)	/* 00=1x; 01=2x; 10=3x; 11=4x */#define PHY_M_EC_S_DSC(x)		SHIFT8(x)	/* 00=dis; 01=1x; 10=2x; 11=3x */#define PHY_M_EC_MAC_S(x)		SHIFT4(x)	/* 01X=0; 110=2.5; 111=25 (MHz) */#define MAC_TX_CLK_0_MHZ	2#define MAC_TX_CLK_2_5_MHZ	6#define MAC_TX_CLK_25_MHZ	7/*****  PHY_MARV_LED_CTRL	16 bit r/w	LED Control Reg *****/#define PHY_M_LEDC_DIS_LED	(1<<15)	/* Bit 15:	Disable LED */#define PHY_M_LEDC_PULS_MSK	(7<<12)	/* Bit 14..12:  Pulse Stretch Mask */#define PHY_M_LEDC_F_INT	(1<<11)	/* Bit 11:	Force Interrupt */#define PHY_M_LEDC_BL_R_MSK	(7<<8)	/* Bit 10.. 8:  Blink Rate Mask */									/* Bit  7.. 5:	reserved */#define PHY_M_LEDC_LINK_MSK	(3<<3)	/* Bit  4.. 3:	Link Control Mask */#define PHY_M_LEDC_DP_CTRL	(1<<2)	/* Bit  2:	Duplex Control */#define PHY_M_LEDC_RX_CTRL	(1<<1)	/* Bit  1:	Rx activity / Link */#define PHY_M_LEDC_TX_CTRL	(1<<0)	/* Bit  0:	Tx activity / Link */#define PHY_M_LED_PULS_DUR(x)	SHIFT12(x)	/* Pulse Stretch Duration */#define	PULS_NO_STR		0		/* no pulse stretching */#define	PULS_21MS		1		/* 21 ms to 42 ms */#define PULS_42MS		2		/* 42 ms to 84 ms */#define PULS_84MS		3		/* 84 ms to 170 ms */#define PULS_170MS		4		/* 170 ms to 340 ms */#define PULS_340MS		5		/* 340 ms to 670 ms */#define PULS_670MS		6		/* 670 ms to 1.3 s */#define PULS_1300MS		7		/* 1.3 s to 2.7 s */#define PHY_M_LED_BLINK_RT(x)	SHIFT8(x)	/* Blink Rate */#define BLINK_42MS		0		/* 42 ms */#define BLINK_84MS		1		/* 84 ms */#define BLINK_170MS		2		/* 170 ms */#define BLINK_340MS		3		/* 340 ms */#define BLINK_670MS		4		/* 670 ms */								/* values 5 - 7: reserved *//*****  PHY_MARV_LED_OVER	16 bit r/w	Manual LED Override Reg *****/#define PHY_M_LED_MO_DUP(x)		SHIFT10(x)	/* Bit 11..10:  Duplex */#define PHY_M_LED_MO_10(x)		SHIFT8(x)	/* Bit  9.. 8:  Link 10 */#define PHY_M_LED_MO_100(x)		SHIFT6(x)	/* Bit  7.. 6:  Link 100 */#define PHY_M_LED_MO_1000(x)	SHIFT4(x)	/* Bit  5.. 4:  Link 1000 */#define PHY_M_LED_MO_RX(x)		SHIFT2(x)	/* Bit  3.. 2:  Rx */#define PHY_M_LED_MO_TX(x)		SHIFT0(x)	/* Bit  1.. 0:  Tx */#define MO_LED_NORM			0#define MO_LED_BLINK		1#define MO_LED_OFF			2#define MO_LED_ON			3/*****  PHY_MARV_EXT_CTRL_2	16 bit r/w	Ext. PHY Specific Ctrl 2 *****/									/* Bit 15.. 7:	reserved */#define PHY_M_EC2_FI_IMPED	(1<<6)	/* Bit  6:	Fiber Input  Impedance */#define PHY_M_EC2_FO_IMPED	(1<<5)	/* Bit  5:	Fiber Output Impedance */#define PHY_M_EC2_FO_M_CLK	(1<<4)	/* Bit  4:	Fiber Mode Clock Enable */#define PHY_M_EC2_FO_BOOST	(1<<3)	/* Bit  3:	Fiber Output Boost */#define PHY_M_EC2_FO_AM_MSK	7		/* Bit  2.. 0:	Fiber Output Amplitude *//*****	PHY_MARV_EXT_P_STAT 16 bit r/w	Ext. PHY Specific Status *****/#define PHY_M_FC_AUTO_SEL	(1<<15)	/* Bit 15:	Fiber/Copper Auto Sel. dis. */#define PHY_M_FC_AN_REG_ACC (1<<14) /* Bit 14:	Fiber/Copper Autoneg. reg acc */#define PHY_M_FC_RESULUTION (1<<13)	/* Bit 13:	Fiber/Copper Resulution */#define PHY_M_SER_IF_AN_BP  (1<<12) /* Bit 12:	Ser IF autoneg. bypass enable */#define PHY_M_SER_IF_BP_ST	(1<<11) /* Bit 11:	Ser IF autoneg. bypass status */#define PHY_M_IRQ_POLARITY	(1<<10) /* Bit 10:	IRQ polarity */									/* Bit 9..4: reserved */#define PHY_M_UNDOC1		(1<< 7) /* undocumented bit !! */#define PHY_M_MODE_MASK		(0xf<<0)/* Bit 3..0: copy of HWCFG MODE[3:0] *//*****  PHY_MARV_CABLE_DIAG	16 bit r/o	Cable Diagnostic Reg *****/#define PHY_M_CABD_ENA_TEST	(1<<15)	/* Bit 15:	Enable Test */#define PHY_M_CABD_STAT

⌨️ 快捷键说明

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