亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mv_eth.c

?? u-boot1.3.0的原碼,從配了網絡驅動和FLASH的驅動,并該用ESC竟如
?? C
?? 第 1 頁 / 共 5 頁
字號:
	win_param.attributes |= EBAR_ATTR_DRAM_CACHE_COHERENCY_WB;#endif	win_param.high_addr = 0;	/* Get bank base */	win_param.base_addr = mv_get_dram_bank_base_addr (BANK2);	win_param.size = mv_get_dram_bank_size (BANK2); /* Get bank size */	if (win_param.size == 0)		win_param.enable = 0;	else		win_param.enable = 1;	/* Enable the access */	win_param.access_ctrl = EWIN_ACCESS_FULL;	/* Enable full access */	/* Set the access control for address window (EPAPR) READ & WRITE */	eth_set_access_control (p_eth_port_ctrl->port_num, &win_param);	/* Set access parameters for DRAM bank 3 */	win_param.win = ETH_WIN3;	/* Use Ethernet window 3 */	win_param.target = ETH_TARGET_DRAM;	/* Window target - DDR */	win_param.attributes = EBAR_ATTR_DRAM_CS3;	/* Enable DRAM bank */#ifndef CONFIG_NOT_COHERENT_CACHE	win_param.attributes |= EBAR_ATTR_DRAM_CACHE_COHERENCY_WB;#endif	win_param.high_addr = 0;	/* Get bank base */	win_param.base_addr = mv_get_dram_bank_base_addr (BANK3);	win_param.size = mv_get_dram_bank_size (BANK3); /* Get bank size */	if (win_param.size == 0)		win_param.enable = 0;	else		win_param.enable = 1;	/* Enable the access */	win_param.access_ctrl = EWIN_ACCESS_FULL;	/* Enable full access */	/* Set the access control for address window (EPAPR) READ & WRITE */	eth_set_access_control (p_eth_port_ctrl->port_num, &win_param);	/* Set access parameters for Internal SRAM */	win_param.win = ETH_WIN4;	/* Use Ethernet window 0 */	win_param.target = EBAR_TARGET_CBS;	/* Target - Internal SRAM */	win_param.attributes = EBAR_ATTR_CBS_SRAM | EBAR_ATTR_CBS_SRAM_BLOCK0;	win_param.high_addr = 0;	win_param.base_addr = mv_get_internal_sram_base ();	/* Get base addr */	win_param.size = MV64460_INTERNAL_SRAM_SIZE;	/* Get bank size */	win_param.enable = 1;	/* Enable the access */	win_param.access_ctrl = EWIN_ACCESS_FULL;	/* Enable full access */	/* Set the access control for address window (EPAPR) READ & WRITE */	eth_set_access_control (p_eth_port_ctrl->port_num, &win_param);	eth_port_init_mac_tables (p_eth_port_ctrl->port_num);	ethernet_phy_set (p_eth_port_ctrl->port_num,			  p_eth_port_ctrl->port_phy_addr);	return;}/******************************************************************************** eth_port_start - Start the Ethernet port activity.** DESCRIPTION:*	This routine prepares the Ethernet port for Rx and Tx activity:*	1. Initialize Tx and Rx Current Descriptor Pointer for each queue that*	    has been initialized a descriptor's ring (using ether_init_tx_desc_ring*	    for Tx and ether_init_rx_desc_ring for Rx)*	2. Initialize and enable the Ethernet configuration port by writing to*	    the port's configuration and command registers.*	3. Initialize and enable the SDMA by writing to the SDMA's*    configuration and command registers.*	After completing these steps, the ethernet port SDMA can starts to*	perform Rx and Tx activities.**	Note: Each Rx and Tx queue descriptor's list must be initialized prior*	to calling this function (use ether_init_tx_desc_ring for Tx queues and*	ether_init_rx_desc_ring for Rx queues).** INPUT:*	ETH_PORT_INFO	*p_eth_port_ctrl       Ethernet port control struct** OUTPUT:*	Ethernet port is ready to receive and transmit.** RETURN:*	false if the port PHY is not up.*	true otherwise.********************************************************************************/static bool eth_port_start (ETH_PORT_INFO * p_eth_port_ctrl){	int queue;	volatile ETH_TX_DESC *p_tx_curr_desc;	volatile ETH_RX_DESC *p_rx_curr_desc;	unsigned int phy_reg_data;	ETH_PORT eth_port_num = p_eth_port_ctrl->port_num;	/* Assignment of Tx CTRP of given queue */	for (queue = 0; queue < MAX_TX_QUEUE_NUM; queue++) {		CURR_TFD_GET (p_tx_curr_desc, queue);		MV_REG_WRITE ((MV64460_ETH_TX_CURRENT_QUEUE_DESC_PTR_0			       (eth_port_num)			       + (4 * queue)),			      ((unsigned int) p_tx_curr_desc));	}	/* Assignment of Rx CRDP of given queue */	for (queue = 0; queue < MAX_RX_QUEUE_NUM; queue++) {		CURR_RFD_GET (p_rx_curr_desc, queue);		MV_REG_WRITE ((MV64460_ETH_RX_CURRENT_QUEUE_DESC_PTR_0			       (eth_port_num)			       + (4 * queue)),			      ((unsigned int) p_rx_curr_desc));		if (p_rx_curr_desc != NULL)			/* Add the assigned Ethernet address to the port's address table */			eth_port_uc_addr_set (p_eth_port_ctrl->port_num,					      p_eth_port_ctrl->port_mac_addr,					      queue);	}	/* Assign port configuration and command. */	MV_REG_WRITE (MV64460_ETH_PORT_CONFIG_REG (eth_port_num),		      p_eth_port_ctrl->port_config);	MV_REG_WRITE (MV64460_ETH_PORT_CONFIG_EXTEND_REG (eth_port_num),		      p_eth_port_ctrl->port_config_extend);	MV_REG_WRITE (MV64460_ETH_PORT_SERIAL_CONTROL_REG (eth_port_num),		      p_eth_port_ctrl->port_serial_control);	MV_SET_REG_BITS (MV64460_ETH_PORT_SERIAL_CONTROL_REG (eth_port_num),			 ETH_SERIAL_PORT_ENABLE);	/* Assign port SDMA configuration */	MV_REG_WRITE (MV64460_ETH_SDMA_CONFIG_REG (eth_port_num),		      p_eth_port_ctrl->port_sdma_config);	MV_REG_WRITE (MV64460_ETH_TX_QUEUE_0_TOKEN_BUCKET_COUNT		      (eth_port_num), 0x3fffffff);	MV_REG_WRITE (MV64460_ETH_TX_QUEUE_0_TOKEN_BUCKET_CONFIG		      (eth_port_num), 0x03fffcff);	/* Turn off the port/queue bandwidth limitation */	MV_REG_WRITE (MV64460_ETH_MAXIMUM_TRANSMIT_UNIT (eth_port_num), 0x0);	/* Enable port Rx. */	MV_REG_WRITE (MV64460_ETH_RECEIVE_QUEUE_COMMAND_REG (eth_port_num),		      p_eth_port_ctrl->port_rx_queue_command);	/* Check if link is up */	eth_port_read_smi_reg (eth_port_num, 1, &phy_reg_data);	if (!(phy_reg_data & 0x20))		return false;	return true;}/******************************************************************************** eth_port_uc_addr_set - This function Set the port Unicast address.** DESCRIPTION:*		This function Set the port Ethernet MAC address.** INPUT:*	ETH_PORT eth_port_num	  Port number.*	char *	      p_addr		Address to be set*	ETH_QUEUE	  queue		Rx queue number for this MAC address.** OUTPUT:*	Set MAC address low and high registers. also calls eth_port_uc_addr()*	To set the unicast table with the proper information.** RETURN:*	N/A.********************************************************************************/static void eth_port_uc_addr_set (ETH_PORT eth_port_num,				  unsigned char *p_addr, ETH_QUEUE queue){	unsigned int mac_h;	unsigned int mac_l;	mac_l = (p_addr[4] << 8) | (p_addr[5]);	mac_h = (p_addr[0] << 24) | (p_addr[1] << 16) |		(p_addr[2] << 8) | (p_addr[3] << 0);	MV_REG_WRITE (MV64460_ETH_MAC_ADDR_LOW (eth_port_num), mac_l);	MV_REG_WRITE (MV64460_ETH_MAC_ADDR_HIGH (eth_port_num), mac_h);	/* Accept frames of this address */	eth_port_uc_addr (eth_port_num, p_addr[5], queue, ACCEPT_MAC_ADDR);	return;}/******************************************************************************** eth_port_uc_addr - This function Set the port unicast address table** DESCRIPTION:*	This function locates the proper entry in the Unicast table for the*	specified MAC nibble and sets its properties according to function*	parameters.** INPUT:*	ETH_PORT	eth_port_num	  Port number.*	unsigned char uc_nibble		Unicast MAC Address last nibble.*	ETH_QUEUE		 queue		Rx queue number for this MAC address.*	int			option	    0 = Add, 1 = remove address.** OUTPUT:*	This function add/removes MAC addresses from the port unicast address*	table.** RETURN:*	true is output succeeded.*	false if option parameter is invalid.********************************************************************************/static bool eth_port_uc_addr (ETH_PORT eth_port_num,			      unsigned char uc_nibble,			      ETH_QUEUE queue, int option){	unsigned int unicast_reg;	unsigned int tbl_offset;	unsigned int reg_offset;	/* Locate the Unicast table entry */	uc_nibble = (0xf & uc_nibble);	tbl_offset = (uc_nibble / 4) * 4;	/* Register offset from unicast table base */	reg_offset = uc_nibble % 4;	/* Entry offset within the above register */	switch (option) {	case REJECT_MAC_ADDR:		/* Clear accepts frame bit at specified unicast DA table entry */		unicast_reg =			MV_REG_READ ((MV64460_ETH_DA_FILTER_UNICAST_TABLE_BASE				      (eth_port_num)				      + tbl_offset));		unicast_reg &= (0x0E << (8 * reg_offset));		MV_REG_WRITE ((MV64460_ETH_DA_FILTER_UNICAST_TABLE_BASE			       (eth_port_num)			       + tbl_offset), unicast_reg);		break;	case ACCEPT_MAC_ADDR:		/* Set accepts frame bit at unicast DA filter table entry */		unicast_reg =			MV_REG_READ ((MV64460_ETH_DA_FILTER_UNICAST_TABLE_BASE				      (eth_port_num)				      + tbl_offset));		unicast_reg |= ((0x01 | queue) << (8 * reg_offset));		MV_REG_WRITE ((MV64460_ETH_DA_FILTER_UNICAST_TABLE_BASE			       (eth_port_num)			       + tbl_offset), unicast_reg);		break;	default:		return false;	}	return true;}#if 0				/* FIXME *//******************************************************************************** eth_port_mc_addr - Multicast address settings.** DESCRIPTION:*	This API controls the MV device MAC multicast support.*	The MV device supports multicast using two tables:*	1) Special Multicast Table for MAC addresses of the form*	   0x01-00-5E-00-00-XX (where XX is between 0x00 and 0x_fF).*	   The MAC DA[7:0] bits are used as a pointer to the Special Multicast*	   Table entries in the DA-Filter table.*	   In this case, the function calls eth_port_smc_addr() routine to set the*	   Special Multicast Table.*	2) Other Multicast Table for multicast of another type. A CRC-8bit*	   is used as an index to the Other Multicast Table entries in the*	   DA-Filter table.*	   In this case, the function calculates the CRC-8bit value and calls*	   eth_port_omc_addr() routine to set the Other Multicast Table.* INPUT:*	ETH_PORT	eth_port_num	  Port number.*	unsigned char	*p_addr		Unicast MAC Address.*	ETH_QUEUE		 queue		Rx queue number for this MAC address.*	int			option	    0 = Add, 1 = remove address.** OUTPUT:*	See description.** RETURN:*	true is output succeeded.*	false if add_address_table_entry( ) failed.********************************************************************************/static void eth_port_mc_addr (ETH_PORT eth_port_num,			      unsigned char *p_addr,			      ETH_QUEUE queue, int option){	unsigned int mac_h;	unsigned int mac_l;	unsigned char crc_result = 0;	int mac_array[48];	int crc[8];	int i;	if ((p_addr[0] == 0x01) &&	    (p_addr[1] == 0x00) &&	    (p_addr[2] == 0x5E) && (p_addr[3] == 0x00) && (p_addr[4] == 0x00)) {		eth_port_smc_addr (eth_port_num, p_addr[5], queue, option);	} else {		/* Calculate CRC-8 out of the given address */		mac_h = (p_addr[0] << 8) | (p_addr[1]);		mac_l = (p_addr[2] << 24) | (p_addr[3] << 16) |			(p_addr[4] << 8) | (p_addr[5] << 0);		for (i = 0; i < 32; i++)			mac_array[i] = (mac_l >> i) & 0x1;		for (i = 32; i < 48; i++)			mac_array[i] = (mac_h >> (i - 32)) & 0x1;		crc[0] = mac_array[45] ^ mac_array[43] ^ mac_array[40] ^			mac_array[39] ^ mac_array[35] ^ mac_array[34] ^			mac_array[31] ^ mac_array[30] ^ mac_array[28] ^			mac_array[23] ^ mac_array[21] ^ mac_array[19] ^			mac_array[18] ^ mac_array[16] ^ mac_array[14] ^			mac_array[12] ^ mac_array[8] ^ mac_array[7] ^			mac_array[6] ^ mac_array[0];		crc[1] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^			mac_array[43] ^ mac_array[41] ^ mac_array[39] ^			mac_array[36] ^ mac_array[34] ^ mac_array[32] ^			mac_array[30] ^ mac_array[29] ^ mac_array[28] ^			mac_array[24] ^ mac_array[23] ^ mac_array[22] ^			mac_array[21] ^ mac_array[20] ^ mac_array[18] ^			mac_array[17] ^ mac_array[16] ^ mac_array[15] ^			mac_array[14] ^ mac_array[13] ^ mac_array[12] ^			mac_array[9] ^ mac_array[6] ^ mac_array[1] ^			mac_array[0];		crc[2] = mac_array[47] ^ mac_array[46] ^ mac_array[44] ^			mac_array[43] ^ mac_array[42] ^ mac_array[39] ^			mac_array[37] ^ mac_array[34] ^ mac_array[33] ^			mac_array[29] ^ mac_array[28] ^ mac_array[25] ^			mac_array[24] ^ mac_array[22] ^ mac_array[17] ^			mac_array[15] ^ mac_array[13] ^ mac_array[12] ^			mac_array[10] ^ mac_array[8] ^ mac_array[6] ^			mac_array[2] ^ mac_array[1] ^ mac_array[0];		crc[3] = mac_array[47] ^ mac_array[45] ^ mac_array[44] ^			mac_array[43] ^ mac_array[40] ^ mac_array[38] ^			mac_array[35] ^ mac_array[34] ^ mac_array[30] ^			mac_array[29] ^ mac_array[26] ^ mac_array[25] ^			mac_array[23] ^ mac_array[18] ^ mac_array[16] ^			mac_array[14] ^ mac_array[13] ^ mac_array[11] ^			mac_array[9] ^ mac_array[7] ^ mac_array[3] ^			mac_array[2] ^ mac_array[1];		crc[4] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^			mac_array[41] ^ mac_array[39] ^ mac_array[36] ^			mac_array[35] ^ mac_array[31] ^ mac_array[30] ^			mac_array[27] ^ mac_array[26] ^ mac_array[24] ^			mac_array[19] ^ mac_array[17] ^ mac_array[15] ^			mac_array[14] ^ mac_array[12] ^ mac_array[10] ^			mac_array[8] ^ mac_array[4] ^ mac_array[3] ^			mac_array[2];		crc[5] = mac_array[47] ^ mac_array[46] ^ mac_array[45] ^			mac_array[42] ^ mac_array[40] ^ mac_array[37] ^			mac_array[36] ^ mac_array[32] ^ mac_array[31] ^			mac_array[28] ^ mac_array[27] ^ mac_array[25] ^			mac_array[20] ^ mac_array[18] ^ mac_array[16] ^			mac_array[15] ^ mac_array[13] ^ mac_array[11] ^			mac_array[9] ^ mac_array[5] ^ mac_array[4] ^			mac_array[3];		crc[6] = mac_array[47] ^ mac_array[46] ^ mac_array[43] ^			mac_array[41] ^ mac_array[38] ^ mac_array[37] ^			mac_array[33] ^ mac_array[32] ^ mac_array[29] ^			mac_array[28] ^ mac_array[26] ^ mac_array[21] ^			mac_array[19] ^ mac_array[17] ^ mac_array[16] ^

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人午夜电影小说| 欧美一级免费观看| 麻豆精品视频在线观看免费 | 久久久午夜精品| 色综合天天在线| 国产剧情一区在线| 天堂久久一区二区三区| 亚洲品质自拍视频网站| 久久天天做天天爱综合色| 欧美日韩一级视频| 色综合久久天天综合网| 国产乱码精品一区二区三区五月婷| 一区二区三区在线观看国产| 中文成人综合网| 亚洲精品一区二区三区福利 | 激情丁香综合五月| 天天亚洲美女在线视频| 亚洲人成7777| 中文字幕一区二区三区不卡在线 | 亚洲激情中文1区| 国产午夜精品在线观看| 日韩你懂的电影在线观看| 欧美日韩国产一级片| 色哟哟亚洲精品| 99精品久久只有精品| 国产成人综合亚洲91猫咪| 精品在线观看视频| 免费人成黄页网站在线一区二区| 亚洲妇熟xx妇色黄| 亚洲图片欧美色图| 亚洲一区二区视频| 亚洲国产精品人人做人人爽| 亚洲一区二区三区中文字幕在线 | 天堂影院一区二区| 天天影视网天天综合色在线播放| 亚洲国产中文字幕在线视频综合 | 久久精品一区蜜桃臀影院| 精品国精品国产尤物美女| 日韩免费在线观看| 精品国产露脸精彩对白| 欧美精品一区二区三区一线天视频| 91精品在线免费| 欧美一卡在线观看| 欧美xxxx老人做受| 久久婷婷国产综合国色天香 | 久久综合久久鬼色中文字| 欧美成人一区二区三区片免费| 日韩一级黄色大片| 精品福利在线导航| 国产精品网站在线| 亚洲精品中文在线观看| 亚洲国产毛片aaaaa无费看| 日韩和欧美一区二区| 麻豆久久久久久| 高清视频一区二区| 色哟哟日韩精品| 欧美精品色综合| 337p粉嫩大胆色噜噜噜噜亚洲| 精品日韩成人av| 中文一区一区三区高中清不卡| 中文字幕一区不卡| 亚洲成人久久影院| 美女mm1313爽爽久久久蜜臀| 国产一区二区三区日韩 | 精品日韩一区二区三区免费视频| 久久久国产午夜精品| 亚洲码国产岛国毛片在线| 亚洲第四色夜色| 韩国v欧美v亚洲v日本v| 91麻豆成人久久精品二区三区| 欧美久久免费观看| 久久久激情视频| 亚洲综合区在线| 国产九九视频一区二区三区| 色综合久久久久| 精品美女一区二区| 亚洲欧美日韩一区二区| 欧美a一区二区| av高清久久久| 91精品免费观看| 国产精品沙发午睡系列990531| 一区二区三区小说| 国产一区二区三区不卡在线观看| 99久久精品费精品国产一区二区| 在线不卡免费av| 国产精品毛片大码女人| 国产精品午夜春色av| 国产酒店精品激情| 欧美日韩美女一区二区| 99久久夜色精品国产网站| 678五月天丁香亚洲综合网| 欧美国产综合色视频| 日日夜夜精品免费视频| 成人av在线播放网址| 欧美一区二区视频免费观看| 综合久久综合久久| 精品一区二区三区免费| 欧美日韩一区高清| 1区2区3区欧美| 国产精品一线二线三线精华| 欧美少妇xxx| 国产精品欧美精品| 久久国产精品区| 欧美色爱综合网| 亚洲三级在线免费| 国产成人在线看| 精品欧美久久久| 日韩二区在线观看| 欧美专区亚洲专区| 自拍偷自拍亚洲精品播放| 国产精品一区二区在线观看网站 | 欧美成人vps| 天堂在线亚洲视频| 欧美三级日韩在线| 亚洲精品精品亚洲| 99久久99久久综合| 国产精品欧美综合在线| 国产成人av资源| 精品国产乱码久久久久久牛牛| 日韩av电影一区| 欧美日韩综合在线| 一区二区三区精品在线| 91美女在线观看| 中文字幕日韩精品一区| 成人精品一区二区三区中文字幕| 久久综合狠狠综合久久综合88| 麻豆精品蜜桃视频网站| 日韩免费观看高清完整版| 日本少妇一区二区| 日韩精品中文字幕在线不卡尤物| 肉色丝袜一区二区| 日韩一区二区在线看| 日韩精品乱码av一区二区| 欧美一区二区三区影视| 日韩高清在线电影| 欧美一级夜夜爽| 国内精品免费**视频| 精品久久久久久久久久久院品网 | 亚洲最大成人综合| 色妹子一区二区| 伊人性伊人情综合网| 91精品1区2区| 日韩电影在线免费观看| 日韩欧美中文一区二区| 精品一区二区三区免费观看| 久久亚区不卡日本| 波多野结衣亚洲一区| 亚洲欧美一区二区三区国产精品| 91黄视频在线| 日韩国产在线一| 日韩免费高清电影| 国产成人免费视频 | 极品美女销魂一区二区三区| 久久久国产精品不卡| thepron国产精品| 亚洲综合色网站| 欧美成人一区二区三区片免费 | 欧美性极品少妇| 捆绑调教美女网站视频一区| 欧美精品一区在线观看| 成人激情免费视频| 午夜免费久久看| 国产亚洲一区二区三区| 97久久久精品综合88久久| 婷婷久久综合九色综合绿巨人| 欧美不卡一区二区三区| 成人毛片视频在线观看| 亚洲线精品一区二区三区| 日韩写真欧美这视频| 成人av网址在线| 亚洲va欧美va人人爽午夜| 精品少妇一区二区| 色又黄又爽网站www久久| 日韩高清不卡一区二区三区| 欧美激情一区二区三区不卡| 欧美日韩在线观看一区二区 | 欧美日韩国产首页在线观看| 中文字幕欧美激情一区| 蜜桃视频一区二区三区在线观看| 久久99热狠狠色一区二区| 日本一区二区在线不卡| 欧美自拍偷拍一区| 国产精品1区二区.| 亚洲电影欧美电影有声小说| 国产日本亚洲高清| 欧美精品自拍偷拍| 成人18视频在线播放| 婷婷六月综合亚洲| 中文字幕一区免费在线观看| 91麻豆精品国产自产在线观看一区 | 在线不卡a资源高清| av成人免费在线观看| 加勒比av一区二区| 天涯成人国产亚洲精品一区av| 久久精品人人做人人爽97| 欧美日高清视频| 色欧美88888久久久久久影院| 国产经典欧美精品| 免费成人美女在线观看.| 亚洲一区二区三区免费视频|