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

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

?? mv_eth.c

?? u-boot1.3.0的原碼,從配了網絡驅動和FLASH的驅動,并該用ESC竟如
?? C
?? 第 1 頁 / 共 5 頁
字號:
 *		API will attach the buffer returned in packet info to the *		descriptor pointed by 'used'. In Tx process, using the Tx *		descriptor return will merely return the user packet info with *		the command status of  the transmitted buffer pointed by the *		'used' index. Nevertheless, it is essential to use this routine *		to update the 'used' index. *		'first' *		This index supports Tx Scatter-Gather. It points to the first *		descriptor of a packet assembled of multiple buffers. For example *		when in middle of Such packet we have a Tx resource error the *		'curr' index get the value of 'first' to indicate that the ring *		returned to its state before trying to transmit this packet. * *		Receive operation: *		The eth_port_receive API set the packet information struct, *		passed by the caller, with received information from the *		'current' SDMA descriptor. *		It is the user responsibility to return this resource back *		to the Rx descriptor ring to enable the reuse of this source. *		Return Rx resource is done using the eth_rx_return_buff API. * *		Transmit operation: *		The eth_port_send API supports Scatter-Gather which enables to *		send a packet spanned over multiple buffers. This means that *		for each packet info structure given by the user and put into *		the Tx descriptors ring, will be transmitted only if the 'LAST' *		bit will be set in the packet info command status field. This *		API also consider restriction regarding buffer alignments and *		sizes. *		The user must return a Tx resource after ensuring the buffer *		has been transmitted to enable the Tx ring indexes to update. * *		BOARD LAYOUT *		This device is on-board.  No jumper diagram is necessary. * *		EXTERNAL INTERFACE * *       Prior to calling the initialization routine eth_port_init() the user *	 must set the following fields under ETH_PORT_INFO struct: *       port_num             User Ethernet port number. *       port_phy_addr		    User PHY address of Ethernet port. *       port_mac_addr[6]	    User defined port MAC address. *       port_config          User port configuration value. *       port_config_extend    User port config extend value. *       port_sdma_config      User port SDMA config value. *       port_serial_control   User port serial control value. *       *port_virt_to_phys ()  User function to cast virtual addr to CPU bus addr. *       *port_private        User scratch pad for user specific data structures. * *       This driver introduce a set of default values: *       PORT_CONFIG_VALUE           Default port configuration value *       PORT_CONFIG_EXTEND_VALUE    Default port extend configuration value *       PORT_SDMA_CONFIG_VALUE      Default sdma control value *       PORT_SERIAL_CONTROL_VALUE   Default port serial control value * *		This driver data flow is done using the PKT_INFO struct which is *		a unified struct for Rx and Tx operations: *		byte_cnt	Tx/Rx descriptor buffer byte count. *		l4i_chk		CPU provided TCP Checksum. For Tx operation only. *		cmd_sts		Tx/Rx descriptor command status. *		buf_ptr		Tx/Rx descriptor buffer pointer. *		return_info	Tx/Rx user resource return information. * * *		EXTERNAL SUPPORT REQUIREMENTS * *		This driver requires the following external support: * *		D_CACHE_FLUSH_LINE (address, address offset) * *		This macro applies assembly code to flush and invalidate cache *		line. *		address        - address base. *		address offset - address offset * * *		CPU_PIPE_FLUSH * *		This macro applies assembly code to flush the CPU pipeline. * *******************************************************************************//* includes *//* defines *//* SDMA command macros */#define ETH_ENABLE_TX_QUEUE(tx_queue, eth_port) \ MV_REG_WRITE(MV64360_ETH_TRANSMIT_QUEUE_COMMAND_REG(eth_port), (1 << tx_queue))#define ETH_DISABLE_TX_QUEUE(tx_queue, eth_port) \ MV_REG_WRITE(MV64360_ETH_TRANSMIT_QUEUE_COMMAND_REG(eth_port),\ (1 << (8 + tx_queue)))#define ETH_ENABLE_RX_QUEUE(rx_queue, eth_port) \MV_REG_WRITE(MV64360_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port), (1 << rx_queue))#define ETH_DISABLE_RX_QUEUE(rx_queue, eth_port) \MV_REG_WRITE(MV64360_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port), (1 << (8 + rx_queue)))#define CURR_RFD_GET(p_curr_desc, queue) \ ((p_curr_desc) = p_eth_port_ctrl->p_rx_curr_desc_q[queue])#define CURR_RFD_SET(p_curr_desc, queue) \ (p_eth_port_ctrl->p_rx_curr_desc_q[queue] = (p_curr_desc))#define USED_RFD_GET(p_used_desc, queue) \ ((p_used_desc) = p_eth_port_ctrl->p_rx_used_desc_q[queue])#define USED_RFD_SET(p_used_desc, queue)\(p_eth_port_ctrl->p_rx_used_desc_q[queue] = (p_used_desc))#define CURR_TFD_GET(p_curr_desc, queue) \ ((p_curr_desc) = p_eth_port_ctrl->p_tx_curr_desc_q[queue])#define CURR_TFD_SET(p_curr_desc, queue) \ (p_eth_port_ctrl->p_tx_curr_desc_q[queue] = (p_curr_desc))#define USED_TFD_GET(p_used_desc, queue) \ ((p_used_desc) = p_eth_port_ctrl->p_tx_used_desc_q[queue])#define USED_TFD_SET(p_used_desc, queue) \ (p_eth_port_ctrl->p_tx_used_desc_q[queue] = (p_used_desc))#define FIRST_TFD_GET(p_first_desc, queue) \ ((p_first_desc) = p_eth_port_ctrl->p_tx_first_desc_q[queue])#define FIRST_TFD_SET(p_first_desc, queue) \ (p_eth_port_ctrl->p_tx_first_desc_q[queue] = (p_first_desc))/* Macros that save access to desc in order to find next desc pointer  */#define RX_NEXT_DESC_PTR(p_rx_desc, queue) (ETH_RX_DESC*)(((((unsigned int)p_rx_desc - (unsigned int)p_eth_port_ctrl->p_rx_desc_area_base[queue]) + RX_DESC_ALIGNED_SIZE) % p_eth_port_ctrl->rx_desc_area_size[queue]) + (unsigned int)p_eth_port_ctrl->p_rx_desc_area_base[queue])#define TX_NEXT_DESC_PTR(p_tx_desc, queue) (ETH_TX_DESC*)(((((unsigned int)p_tx_desc - (unsigned int)p_eth_port_ctrl->p_tx_desc_area_base[queue]) + TX_DESC_ALIGNED_SIZE) % p_eth_port_ctrl->tx_desc_area_size[queue]) + (unsigned int)p_eth_port_ctrl->p_tx_desc_area_base[queue])#define LINK_UP_TIMEOUT		100000#define PHY_BUSY_TIMEOUT    10000000/* locals *//* PHY routines */static void ethernet_phy_set (ETH_PORT eth_port_num, int phy_addr);static int ethernet_phy_get (ETH_PORT eth_port_num);/* Ethernet Port routines */static void eth_set_access_control (ETH_PORT eth_port_num,				    ETH_WIN_PARAM * param);static bool eth_port_uc_addr (ETH_PORT eth_port_num, unsigned char uc_nibble,			      ETH_QUEUE queue, int option);#if 0				/* FIXME */static bool eth_port_smc_addr (ETH_PORT eth_port_num,			       unsigned char mc_byte,			       ETH_QUEUE queue, int option);static bool eth_port_omc_addr (ETH_PORT eth_port_num,			       unsigned char crc8,			       ETH_QUEUE queue, int option);#endifstatic void eth_b_copy (unsigned int src_addr, unsigned int dst_addr,			int byte_count);void eth_dbg (ETH_PORT_INFO * p_eth_port_ctrl);typedef enum _memory_bank { BANK0, BANK1, BANK2, BANK3 } MEMORY_BANK;u32 mv_get_dram_bank_base_addr (MEMORY_BANK bank){	u32 result = 0;	u32 enable = MV_REG_READ (MV64360_BASE_ADDR_ENABLE);	if (enable & (1 << bank))		return 0;	if (bank == BANK0)		result = MV_REG_READ (MV64360_CS_0_BASE_ADDR);	if (bank == BANK1)		result = MV_REG_READ (MV64360_CS_1_BASE_ADDR);	if (bank == BANK2)		result = MV_REG_READ (MV64360_CS_2_BASE_ADDR);	if (bank == BANK3)		result = MV_REG_READ (MV64360_CS_3_BASE_ADDR);	result &= 0x0000ffff;	result = result << 16;	return result;}u32 mv_get_dram_bank_size (MEMORY_BANK bank){	u32 result = 0;	u32 enable = MV_REG_READ (MV64360_BASE_ADDR_ENABLE);	if (enable & (1 << bank))		return 0;	if (bank == BANK0)		result = MV_REG_READ (MV64360_CS_0_SIZE);	if (bank == BANK1)		result = MV_REG_READ (MV64360_CS_1_SIZE);	if (bank == BANK2)		result = MV_REG_READ (MV64360_CS_2_SIZE);	if (bank == BANK3)		result = MV_REG_READ (MV64360_CS_3_SIZE);	result += 1;	result &= 0x0000ffff;	result = result << 16;	return result;}u32 mv_get_internal_sram_base (void){	u32 result;	result = MV_REG_READ (MV64360_INTEGRATED_SRAM_BASE_ADDR);	result &= 0x0000ffff;	result = result << 16;	return result;}/******************************************************************************** eth_port_init - Initialize the Ethernet port driver** DESCRIPTION:*       This function prepares the ethernet port to start its activity:*       1) Completes the ethernet port driver struct initialization toward port*           start routine.*       2) Resets the device to a quiescent state in case of warm reboot.*       3) Enable SDMA access to all four DRAM banks as well as internal SRAM.*       4) Clean MAC tables. The reset status of those tables is unknown.*       5) Set PHY address.*       Note: Call this routine prior to eth_port_start routine and after setting*       user values in the user fields of Ethernet port control struct (i.e.*       port_phy_addr).** INPUT:*       ETH_PORT_INFO 	*p_eth_port_ctrl       Ethernet port control struct** OUTPUT:*       See description.** RETURN:*       None.********************************************************************************/static void eth_port_init (ETH_PORT_INFO * p_eth_port_ctrl){	int queue;	ETH_WIN_PARAM win_param;	p_eth_port_ctrl->port_config = PORT_CONFIG_VALUE;	p_eth_port_ctrl->port_config_extend = PORT_CONFIG_EXTEND_VALUE;	p_eth_port_ctrl->port_sdma_config = PORT_SDMA_CONFIG_VALUE;	p_eth_port_ctrl->port_serial_control = PORT_SERIAL_CONTROL_VALUE;	p_eth_port_ctrl->port_rx_queue_command = 0;	p_eth_port_ctrl->port_tx_queue_command = 0;	/* Zero out SW structs */	for (queue = 0; queue < MAX_RX_QUEUE_NUM; queue++) {		CURR_RFD_SET ((ETH_RX_DESC *) 0x00000000, queue);		USED_RFD_SET ((ETH_RX_DESC *) 0x00000000, queue);		p_eth_port_ctrl->rx_resource_err[queue] = false;	}	for (queue = 0; queue < MAX_TX_QUEUE_NUM; queue++) {		CURR_TFD_SET ((ETH_TX_DESC *) 0x00000000, queue);		USED_TFD_SET ((ETH_TX_DESC *) 0x00000000, queue);		FIRST_TFD_SET ((ETH_TX_DESC *) 0x00000000, queue);		p_eth_port_ctrl->tx_resource_err[queue] = false;	}	eth_port_reset (p_eth_port_ctrl->port_num);	/* Set access parameters for DRAM bank 0 */	win_param.win = ETH_WIN0;	/* Use Ethernet window 0 */	win_param.target = ETH_TARGET_DRAM;	/* Window target - DDR  */	win_param.attributes = EBAR_ATTR_DRAM_CS0;	/* 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 (BANK0);	win_param.size = mv_get_dram_bank_size (BANK0);	/* 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 1 */	win_param.win = ETH_WIN1;	/* Use Ethernet window 1 */	win_param.target = ETH_TARGET_DRAM;	/* Window target - DDR */	win_param.attributes = EBAR_ATTR_DRAM_CS1;	/* 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 (BANK1);	win_param.size = mv_get_dram_bank_size (BANK1);	/* 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 2 */	win_param.win = ETH_WIN2;	/* Use Ethernet window 2 */	win_param.target = ETH_TARGET_DRAM;	/* Window target - DDR */	win_param.attributes = EBAR_ATTR_DRAM_CS2;	/* 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 (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 = MV64360_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.*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费看日韩a级影片| 91精品黄色片免费大全| 欧美日韩二区三区| 国产精品五月天| 男人的天堂亚洲一区| 97成人超碰视| 欧美男女性生活在线直播观看| 91精品国产综合久久久蜜臀粉嫩| 国产精品高潮久久久久无| 青青草国产成人av片免费| 色女孩综合影院| 中文字幕欧美三区| 国产一区二区三区久久久| 日韩丝袜美女视频| 午夜精品久久久久影视| av综合在线播放| 国产精品欧美经典| 国产麻豆精品95视频| 精品美女在线观看| 蜜臀av性久久久久蜜臀aⅴ| 欧美偷拍一区二区| 亚洲一卡二卡三卡四卡| 色哟哟精品一区| 综合欧美一区二区三区| 丁香婷婷综合网| 国产日产欧美一区| 丁香一区二区三区| 国产精品美女一区二区在线观看| 国产一区二区伦理片| 欧美成人精品高清在线播放 | 日本视频免费一区| 91福利国产精品| 亚洲伦在线观看| 色诱视频网站一区| 亚洲三级在线播放| 在线观看欧美黄色| 亚洲一区av在线| 91精品国产欧美一区二区成人| 亚洲国产sm捆绑调教视频| 欧美日韩在线观看一区二区| 亚洲大片精品永久免费| 欧美一区二区视频观看视频| 久久97超碰色| 国产日产欧美一区二区视频| 成人a级免费电影| 亚洲特级片在线| 欧美在线观看视频在线| 午夜电影网一区| 日韩欧美精品三级| 国产成人在线视频免费播放| 综合色天天鬼久久鬼色| 欧美日本一道本| 美美哒免费高清在线观看视频一区二区| 日韩三级av在线播放| 成人永久看片免费视频天堂| 亚洲欧洲综合另类| 欧美一区二区福利视频| 精品亚洲国内自在自线福利| 国产精品丝袜久久久久久app| 色综合久久久久网| 免费成人美女在线观看.| 久久精品一二三| 日本精品一区二区三区四区的功能| 亚洲成人av中文| 久久久国产精华| 欧美在线免费观看视频| 激情亚洲综合在线| 一区二区三区产品免费精品久久75| 欧美一区二区三区四区在线观看| 成人夜色视频网站在线观看| 亚洲激情自拍偷拍| 日韩免费高清电影| 一本色道久久综合亚洲aⅴ蜜桃| 日本不卡免费在线视频| 国产精品久久夜| 日韩一级免费一区| 91理论电影在线观看| 老司机精品视频一区二区三区| 亚洲欧美综合色| 日韩视频一区在线观看| 色综合天天天天做夜夜夜夜做| 蜜桃一区二区三区在线| 亚洲久本草在线中文字幕| 精品久久久久av影院| 在线免费观看日本一区| 国产成人欧美日韩在线电影| 五月综合激情网| 国产精品初高中害羞小美女文| 91精品国产综合久久香蕉麻豆| 91天堂素人约啪| 国产麻豆视频一区| 久久精品国产亚洲一区二区三区 | 一区二区三区精品视频在线| 久久精品一二三| 精品久久久久久久一区二区蜜臀| 欧美在线综合视频| 91女人视频在线观看| 国产成人精品三级麻豆| 久久se精品一区精品二区| 亚洲午夜一区二区| 亚洲日本在线视频观看| 国产精品高潮呻吟| 中文字幕亚洲在| 欧美国产日韩一二三区| 久久久久久久久久久99999| 欧美一区二区三区四区视频| 欧美丰满少妇xxxbbb| 欧美亚男人的天堂| 欧美网站大全在线观看| 欧洲视频一区二区| 91精品91久久久中77777| 色www精品视频在线观看| 色综合久久久网| 91国偷自产一区二区使用方法| 成人不卡免费av| 97久久久精品综合88久久| 成人av在线资源网站| 成人精品视频一区二区三区尤物| 国产传媒久久文化传媒| 成人午夜视频福利| 91视频在线观看| 日本久久一区二区| 欧美日韩另类国产亚洲欧美一级| 日本福利一区二区| 91麻豆精品久久久久蜜臀| 欧美一区二区福利在线| 久久久久久久久伊人| 中文字幕一区二区三区四区不卡| 亚洲三级小视频| 偷拍一区二区三区| 国产一区欧美日韩| 成人免费毛片app| 91久久一区二区| 91精品国产丝袜白色高跟鞋| 欧美大片一区二区| 欧美国产日韩一二三区| 一区二区三区在线观看网站| 视频一区在线视频| 久久97超碰国产精品超碰| 成av人片一区二区| 欧美日韩在线精品一区二区三区激情| 欧美一区二区三区的| 亚洲国产精品激情在线观看| 中文字幕日韩av资源站| 日韩精品一二三区| 国产成人在线视频网址| 欧美性猛交一区二区三区精品| 欧美r级在线观看| 国产精品美女久久久久久2018 | 欧美色精品在线视频| 日韩视频免费直播| 国产精品污网站| 五月婷婷欧美视频| 成人免费看片app下载| 欧美日本一道本在线视频| 国产亚洲一区字幕| 午夜精品久久久久| 北条麻妃一区二区三区| 4438x亚洲最大成人网| 国产精品久久久久影院色老大 | 欧美xxxxx牲另类人与| 国产精品久久久一本精品| 日本一道高清亚洲日美韩| 丁香啪啪综合成人亚洲小说| 在线成人免费观看| 国产精品污www在线观看| 日本欧美肥老太交大片| 色综合天天狠狠| 国产三级精品三级在线专区| 奇米影视7777精品一区二区| 91性感美女视频| 欧美激情一区二区三区全黄| 美女一区二区视频| 欧美三级电影精品| 亚洲欧洲精品成人久久奇米网| 久久99精品一区二区三区三区| 在线观看欧美黄色| 中文字幕在线一区| 国产成人综合自拍| 精品少妇一区二区三区在线视频| 亚洲成人av在线电影| 色综合色综合色综合| 中文字幕一区二区日韩精品绯色 | 日韩在线卡一卡二| 欧美最猛黑人xxxxx猛交| 国产精品久久国产精麻豆99网站 | av在线播放成人| 久久久久久久久久电影| 韩国v欧美v日本v亚洲v| 日韩欧美一二三区| 另类小说图片综合网| 欧美日本一区二区三区四区| 亚洲一区二区四区蜜桃| 在线视频国内自拍亚洲视频| 亚洲欧美视频在线观看| 91视频免费看| 日韩理论片一区二区| 91社区在线播放| 亚洲精品一二三区| 日本乱人伦aⅴ精品|