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

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

?? mv_eth.c

?? AT9260的BOOTLOADER,還有幾個版本的,需要的我再放
?? 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一区二区三区免费野_久草精品视频
国产精品传媒在线| 欧美区视频在线观看| 久久日韩精品一区二区五区| 亚洲国产欧美在线| 欧洲av在线精品| 亚洲福利一区二区三区| 欧美日韩一本到| 日本一不卡视频| 久久午夜羞羞影院免费观看| 国产乱理伦片在线观看夜一区| 久久久久久电影| av电影在线观看一区| 亚洲精品福利视频网站| 欧美日韩在线三区| 美女一区二区久久| 久久日韩粉嫩一区二区三区| 成人亚洲一区二区一| 亚洲人成小说网站色在线| 在线观看亚洲成人| 美女视频黄久久| 中文字幕av一区二区三区| 99久久久无码国产精品| 亚洲国产wwwccc36天堂| 日韩精品一区二区三区三区免费| 国产美女精品在线| 亚洲视频中文字幕| 911国产精品| 国产很黄免费观看久久| 一区二区三区不卡在线观看| 欧美成人免费网站| jvid福利写真一区二区三区| 亚洲妇女屁股眼交7| 久久久久久久久一| 91精品福利在线| 国内国产精品久久| 亚洲精品高清视频在线观看| 欧美成人伊人久久综合网| 成人一区在线看| 日韩电影在线一区二区三区| 日本一区二区三区在线观看| 欧美人xxxx| 99精品视频中文字幕| 日韩在线a电影| 中日韩av电影| 日韩视频一区二区三区| 成人av在线网站| 欧美aaa在线| 亚洲一区二区三区视频在线播放| 久久九九久精品国产免费直播| 欧美性大战久久久久久久| 国产成人综合亚洲91猫咪| 午夜精品在线看| 亚洲婷婷国产精品电影人久久| 日韩欧美国产成人一区二区| 精品视频一区三区九区| 成人动漫视频在线| 久久精品国产亚洲5555| 亚洲国产一区在线观看| 久久久久久久av麻豆果冻| 欧美一区日本一区韩国一区| 91精彩视频在线| av在线播放成人| 国产成人免费在线观看不卡| 青草国产精品久久久久久| 一区二区三区国产精品| 成人欧美一区二区三区在线播放| 精品少妇一区二区| 欧美一区二区三区思思人| 欧美在线短视频| 91久久精品日日躁夜夜躁欧美| www.亚洲在线| 成人免费高清视频在线观看| 国产精品一区二区不卡| 国产一区二区电影| 国产最新精品免费| 麻豆成人av在线| 日本不卡免费在线视频| 日一区二区三区| 午夜亚洲国产au精品一区二区| 亚洲一区二区三区中文字幕在线| 亚洲天堂免费看| 自拍偷拍国产精品| 亚洲免费在线观看视频| 中文字幕视频一区| 综合久久一区二区三区| 亚洲免费av网站| 亚洲综合偷拍欧美一区色| 一区二区三区色| 亚洲国产日韩一区二区| 五月激情综合网| 热久久久久久久| 精品在线你懂的| 国产一区二区女| 岛国精品在线播放| 成人a级免费电影| 91麻豆国产在线观看| 一本一道久久a久久精品| 在线观看视频一区二区欧美日韩| 色综合天天综合| 精品婷婷伊人一区三区三| 欧美日韩dvd在线观看| 欧美一区二区精品在线| 精品国产亚洲在线| 国产精品乱码人人做人人爱| 日韩理论片在线| 午夜久久久久久久久| 国产一区二区三区免费播放 | 成人av电影观看| 色综合一区二区三区| 欧美精品久久一区| 亚洲精品在线网站| 日本免费新一区视频| 五月激情综合色| 日韩电影免费在线| 国精产品一区一区三区mba视频| 成人性色生活片免费看爆迷你毛片| 懂色av一区二区在线播放| 91在线视频免费观看| 在线成人午夜影院| 国产午夜一区二区三区| 综合久久久久久久| 久久福利视频一区二区| 成人手机电影网| 欧美日韩免费电影| 久久影院午夜论| 亚洲综合在线五月| 国产综合久久久久久鬼色| 色综合中文字幕| 日韩欧美成人午夜| 亚洲另类在线视频| 精品在线一区二区| 欧美日韩免费高清一区色橹橹| 精品久久久久一区二区国产| 亚洲自拍与偷拍| 国产福利精品导航| 欧美欧美欧美欧美首页| 国产精品每日更新在线播放网址 | 开心九九激情九九欧美日韩精美视频电影 | 国产精品三级电影| 日韩av中文字幕一区二区 | 国产成人免费视频网站高清观看视频 | 亚洲国产一区二区三区| 成人丝袜高跟foot| 精品国产3级a| 午夜精品成人在线视频| www.欧美精品一二区| 精品国产91久久久久久久妲己| 亚洲综合丝袜美腿| 99在线精品一区二区三区| www成人在线观看| 五月天激情综合| 欧美亚洲国产一区二区三区va| 欧美激情一二三区| 乱一区二区av| 欧美一区午夜视频在线观看 | 亚洲国产精品久久久男人的天堂| 成人爱爱电影网址| 国产午夜精品美女毛片视频| 日产精品久久久久久久性色| 欧美日韩国产电影| 亚洲影视在线观看| 99re成人精品视频| 欧美极品aⅴ影院| 国产精品一二三四区| 日韩小视频在线观看专区| 午夜久久久影院| 精品视频色一区| 亚洲va欧美va人人爽| 色噜噜狠狠色综合欧洲selulu | 18涩涩午夜精品.www| 国产aⅴ综合色| 久久丝袜美腿综合| 国产精品1024| 国产日产欧美一区| 国产精品88av| 国产精品伦一区二区三级视频| 国产不卡免费视频| 国产精品乱码一区二区三区软件 | 国产成人在线视频免费播放| 26uuu精品一区二区| 国产美女精品人人做人人爽 | 欧美日本国产视频| 午夜免费久久看| 欧美一区二区在线视频| 毛片基地黄久久久久久天堂| 欧美一二三区在线观看| 九九**精品视频免费播放| 精品国产乱码久久久久久久久| 久久66热re国产| 久久精品一二三| gogogo免费视频观看亚洲一| 亚洲精品国产第一综合99久久| 欧美日韩一级二级三级| 日本成人在线电影网| 亚洲精品一区二区三区影院| 国产电影一区在线| 亚洲欧美日韩在线播放| 欧美日韩一区久久| 麻豆免费看一区二区三区| 久久伊99综合婷婷久久伊|