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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lan91c96.c

?? U-boot源碼 ARM7啟動代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
	if (packet_no & LAN91C96_ARR_FAILED) {		/* or isn't there?  BAD CHIP! */		printf ("%s: Memory allocation failed. \n", SMC_DEV_NAME);		return 0;	}	/* we have a packet address, so tell the card to use it */	SMC_outb (packet_no, LAN91C96_PNR);	/* point to the beginning of the packet */	SMC_outw (LAN91C96_PTR_AUTO_INCR, LAN91C96_POINTER);	PRINTK3 ("%s: Trying to xmit packet of length %x\n",			 SMC_DEV_NAME, length);#if SMC_DEBUG > 2	printf ("Transmitting Packet\n");	print_packet (buf, length);#endif	/* send the packet length ( +6 for status, length and ctl byte )	   and the status word ( set to zeros ) */#ifdef USE_32_BIT	SMC_outl ((length + 6) << 16, LAN91C96_DATA_HIGH);#else	SMC_outw (0, LAN91C96_DATA_HIGH);	/* send the packet length ( +6 for status words, length, and ctl */	SMC_outw ((length + 6), LAN91C96_DATA_HIGH);#endif /* USE_32_BIT */	/* send the actual data	 * I _think_ it's faster to send the longs first, and then	 * mop up by sending the last word.  It depends heavily	 * on alignment, at least on the 486.  Maybe it would be	 * a good idea to check which is optimal?  But that could take	 * almost as much time as is saved?	 */#ifdef USE_32_BIT	SMC_outsl (LAN91C96_DATA_HIGH, buf, length >> 2);	if (length & 0x2)		SMC_outw (*((word *) (buf + (length & 0xFFFFFFFC))),				  LAN91C96_DATA_HIGH);#else	SMC_outsw (LAN91C96_DATA_HIGH, buf, (length) >> 1);#endif /* USE_32_BIT */	/* Send the last byte, if there is one.   */	if ((length & 1) == 0) {		SMC_outw (0, LAN91C96_DATA_HIGH);	} else {		SMC_outw (buf[length - 1] | 0x2000, LAN91C96_DATA_HIGH);	}	/* and let the chipset deal with it */	SMC_outw (LAN91C96_MMUCR_ENQUEUE, LAN91C96_MMU);	/* poll for TX INT */	if (poll4int (LAN91C96_MSK_TX_INT, SMC_TX_TIMEOUT)) {		/* sending failed */		PRINTK2 ("%s: TX timeout, sending failed...\n", SMC_DEV_NAME);		/* release packet */		SMC_outw (LAN91C96_MMUCR_RELEASE_TX, LAN91C96_MMU);		/* wait for MMU getting ready (low) */		while (SMC_inw (LAN91C96_MMU) & LAN91C96_MMUCR_NO_BUSY) {			udelay (10);		}		PRINTK2 ("MMU ready\n");		return 0;	} else {		/* ack. int */		SMC_outw (LAN91C96_IST_TX_INT, LAN91C96_INT_STATS);		PRINTK2 ("%s: Sent packet of length %d \n", SMC_DEV_NAME, length);		/* release packet */		SMC_outw (LAN91C96_MMUCR_RELEASE_TX, LAN91C96_MMU);		/* wait for MMU getting ready (low) */		while (SMC_inw (LAN91C96_MMU) & LAN91C96_MMUCR_NO_BUSY) {			udelay (10);		}		PRINTK2 ("MMU ready\n");	}	return length;}/*------------------------------------------------------------------------- * smc_destructor( struct net_device * dev ) *   Input parameters: *	dev, pointer to the device structure * *   Output: *	None. *-------------------------------------------------------------------------- */void smc_destructor (){	PRINTK2 (CARDNAME ":smc_destructor\n");}/* * Open and Initialize the board * * Set up everything, reset the card, etc .. * */static int smc_open (bd_t *bd){	int i, err;			/* used to set hw ethernet address */	PRINTK2 ("%s:smc_open\n", SMC_DEV_NAME);	/* reset the hardware */	smc_reset ();	smc_enable ();	SMC_SELECT_BANK (1);	err = smc_get_ethaddr (bd);	/* set smc_mac_addr, and sync it with u-boot globals */	if (err < 0) {		memset (bd->bi_enetaddr, 0, 6); /* hack to make error stick! upper code will abort if not set */		return (-1);	/* upper code ignores this, but NOT bi_enetaddr */	}#ifdef USE_32_BIT	for (i = 0; i < 6; i += 2) {		word address;		address = smc_mac_addr[i + 1] << 8;		address |= smc_mac_addr[i];		SMC_outw (address, LAN91C96_IA0 + i);	}#else	for (i = 0; i < 6; i++)		SMC_outb (smc_mac_addr[i], LAN91C96_IA0 + i);#endif	return 0;}/*------------------------------------------------------------- * * smc_rcv -  receive a packet from the card * * There is ( at least ) a packet waiting to be read from * chip-memory. * * o Read the status * o If an error, record it * o otherwise, read in the packet *------------------------------------------------------------- */static int smc_rcv (){	int packet_number;	word status;	word packet_length;	int is_error = 0;#ifdef USE_32_BIT	dword stat_len;#endif	SMC_SELECT_BANK (2);	packet_number = SMC_inw (LAN91C96_FIFO);	if (packet_number & LAN91C96_FIFO_RXEMPTY) {		return 0;	}	PRINTK3 ("%s:smc_rcv\n", SMC_DEV_NAME);	/*  start reading from the start of the packet */	SMC_outw (LAN91C96_PTR_READ | LAN91C96_PTR_RCV |			  LAN91C96_PTR_AUTO_INCR, LAN91C96_POINTER);	/* First two words are status and packet_length */#ifdef USE_32_BIT	stat_len = SMC_inl (LAN91C96_DATA_HIGH);	status = stat_len & 0xffff;	packet_length = stat_len >> 16;#else	status = SMC_inw (LAN91C96_DATA_HIGH);	packet_length = SMC_inw (LAN91C96_DATA_HIGH);#endif	packet_length &= 0x07ff;	/* mask off top bits */	PRINTK2 ("RCV: STATUS %4x LENGTH %4x\n", status, packet_length);	if (!(status & FRAME_FILTER)) {		/* Adjust for having already read the first two words */		packet_length -= 4;		/*4; */		/* set odd length for bug in LAN91C111, */		/* which never sets RS_ODDFRAME */		/* TODO ? */#ifdef USE_32_BIT		PRINTK3 (" Reading %d dwords (and %d bytes) \n",			 packet_length >> 2, packet_length & 3);		/* QUESTION:  Like in the TX routine, do I want		   to send the DWORDs or the bytes first, or some		   mixture.  A mixture might improve already slow PIO		   performance  */		SMC_insl (LAN91C96_DATA_HIGH, NetRxPackets[0], packet_length >> 2);		/* read the left over bytes */		if (packet_length & 3) {			int i;			byte *tail = (byte *) (NetRxPackets[0] + (packet_length & ~3));			dword leftover = SMC_inl (LAN91C96_DATA_HIGH);			for (i = 0; i < (packet_length & 3); i++)				*tail++ = (byte) (leftover >> (8 * i)) & 0xff;		}#else		PRINTK3 (" Reading %d words and %d byte(s) \n",				 (packet_length >> 1), packet_length & 1);		SMC_insw (LAN91C96_DATA_HIGH, NetRxPackets[0], packet_length >> 1);#endif /* USE_32_BIT */#if	SMC_DEBUG > 2		printf ("Receiving Packet\n");		print_packet (NetRxPackets[0], packet_length);#endif	} else {		/* error ... */		/* TODO ? */		is_error = 1;	}	while (SMC_inw (LAN91C96_MMU) & LAN91C96_MMUCR_NO_BUSY)		udelay (1);		/* Wait until not busy */	/*  error or good, tell the card to get rid of this packet */	SMC_outw (LAN91C96_MMUCR_RELEASE_RX, LAN91C96_MMU);	while (SMC_inw (LAN91C96_MMU) & LAN91C96_MMUCR_NO_BUSY)		udelay (1);		/* Wait until not busy */	if (!is_error) {		/* Pass the packet up to the protocol layers. */		NetReceive (NetRxPackets[0], packet_length);		return packet_length;	} else {		return 0;	}}/*---------------------------------------------------- * smc_close * * this makes the board clean up everything that it can * and not talk to the outside world.   Caused by * an 'ifconfig ethX down' * -----------------------------------------------------*/static int smc_close (){	PRINTK2 ("%s:smc_close\n", SMC_DEV_NAME);	/* clear everything */	smc_shutdown ();	return 0;}#if SMC_DEBUG > 2static void print_packet (byte * buf, int length){#if 0	int i;	int remainder;	int lines;	printf ("Packet of length %d \n", length);	lines = length / 16;	remainder = length % 16;	for (i = 0; i < lines; i++) {		int cur;		for (cur = 0; cur < 8; cur++) {			byte a, b;			a = *(buf++);			b = *(buf++);			printf ("%02x%02x ", a, b);		}		printf ("\n");	}	for (i = 0; i < remainder / 2; i++) {		byte a, b;		a = *(buf++);		b = *(buf++);		printf ("%02x%02x ", a, b);	}	printf ("\n");#endif /* 0 */}#endif /* SMC_DEBUG > 2 */int eth_init (bd_t * bd){	return (smc_open(bd));}void eth_halt (){	smc_close ();}int eth_rx (){	return smc_rcv ();}int eth_send (volatile void *packet, int length){	return smc_send_packet (packet, length);}#if 0/*------------------------------------------------------------------------- * smc_hw_init() * *   Function: *      Reset and enable the device, check if the I/O space location *      is correct * *   Input parameters: *      None * *   Output: *	0 --> success *	1 --> error *-------------------------------------------------------------------------- */static int smc_hw_init (){	unsigned short status_test;	/* The attribute register of the LAN91C96 is located at address	   0x0e000000 on the lubbock platform */	volatile unsigned *attaddr = (unsigned *) (0x0e000000);	/* first reset, then enable the device. Sequence is critical */	attaddr[LAN91C96_ECOR] |= LAN91C96_ECOR_SRESET;	udelay (100);	attaddr[LAN91C96_ECOR] &= ~LAN91C96_ECOR_SRESET;	attaddr[LAN91C96_ECOR] |= LAN91C96_ECOR_ENABLE;	/* force 16-bit mode */	attaddr[LAN91C96_ECSR] &= ~LAN91C96_ECSR_IOIS8;	udelay (100);	/* check if the I/O address is correct, the upper byte of the	   bank select register should read 0x33 */	status_test = SMC_inw (LAN91C96_BANK_SELECT);	if ((status_test & 0xFF00) != 0x3300) {		printf ("Failed to initialize ethernetchip\n");		return 1;	}	return 0;}#endif /* 0 */#endif /* COMMANDS & CFG_NET *//* smc_get_ethaddr (bd_t * bd) * * This checks both the environment and the ROM for an ethernet address. If * found, the environment takes precedence. */int smc_get_ethaddr (bd_t * bd){	int env_size = 0;	int rom_valid = 0;	int env_present = 0;	int reg = 0;	char *s = NULL;	char *e = NULL;	char *v_mac, es[] = "11:22:33:44:55:66";	char s_env_mac[64];	uchar v_env_mac[6];	uchar v_rom_mac[6];	env_size = getenv_r ("ethaddr", s_env_mac, sizeof (s_env_mac));	if (env_size != sizeof(es)) {	/* Ignore if env is bad or not set */		printf ("\n*** Warning: ethaddr is not set properly, ignoring!!\n");	} else {		env_present = 1;		s = s_env_mac;		for (reg = 0; reg < 6; ++reg) { /* turn string into mac value */			v_env_mac[reg] = s ? simple_strtoul (s, &e, 16) : 0;			if (s)				s = (*e) ? e + 1 : e;		}	}	rom_valid = get_rom_mac (v_rom_mac);	/* get ROM mac value if any */	if (!env_present) {	/* if NO env */		if (rom_valid) {	/* but ROM is valid */			v_mac = (char *)v_rom_mac;			sprintf (s_env_mac, "%02X:%02X:%02X:%02X:%02X:%02X",				 v_mac[0], v_mac[1], v_mac[2], v_mac[3],				 v_mac[4], v_mac[5]);			setenv ("ethaddr", s_env_mac);		} else {	/* no env, bad ROM */			printf ("\n*** ERROR: ethaddr is NOT set !!\n");			return (-1);		}	} else {		/* good env, don't care ROM */		v_mac = (char *)v_env_mac;	/* always use a good env over a ROM */	}	if (env_present && rom_valid) { /* if both env and ROM are good */		if (memcmp (v_env_mac, v_rom_mac, 6) != 0) {			printf ("\nWarning: MAC addresses don't match:\n");			printf ("\tHW MAC address:  "				"%02X:%02X:%02X:%02X:%02X:%02X\n",				v_rom_mac[0], v_rom_mac[1],				v_rom_mac[2], v_rom_mac[3],				v_rom_mac[4], v_rom_mac[5] );			printf ("\t\"ethaddr\" value: "				"%02X:%02X:%02X:%02X:%02X:%02X\n",				v_env_mac[0], v_env_mac[1],				v_env_mac[2], v_env_mac[3],				v_env_mac[4], v_env_mac[5]) ;			debug ("### Set MAC addr from environment\n");		}	}	memcpy (bd->bi_enetaddr, v_mac, 6);	/* update global address to match env (allows env changing) */	smc_set_mac_addr ((unsigned char *)v_mac); /* use old function to update smc default */	PRINTK("Using MAC Address %02X:%02X:%02X:%02X:%02X:%02X\n", v_mac[0], v_mac[1],		v_mac[2], v_mac[3], v_mac[4], v_mac[5]);	return (0);}/* * get_rom_mac() * Note, this has omly been tested for the OMAP730 P2. */int get_rom_mac (unsigned char *v_rom_mac){#ifdef HARDCODE_MAC	/* used for testing or to supress run time warnings */	char hw_mac_addr[] = { 0x02, 0x80, 0xad, 0x20, 0x31, 0xb8 };	memcpy (v_rom_mac, hw_mac_addr, 6);	return (1);#else	int i;	SMC_SELECT_BANK (1);	for (i=0; i<6; i++)	{		v_rom_mac[i] = SMC_inb (LAN91C96_IA0 + i);	}	return (1);#endif}#endif /* CONFIG_DRIVER_LAN91C96 */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品二三区| 欧美日本视频在线| 国内成人免费视频| 日韩精品亚洲一区| 日韩国产高清在线| 日韩黄色片在线观看| 日韩激情一二三区| 蓝色福利精品导航| 国产剧情一区二区| 国产馆精品极品| 不卡的av网站| 欧美性受xxxx黑人xyx| 欧美三级资源在线| 日韩一区二区电影网| 精品第一国产综合精品aⅴ| 精品国产91乱码一区二区三区 | ●精品国产综合乱码久久久久| 国产日韩一级二级三级| 国产欧美精品一区| 亚洲欧美一区二区三区极速播放| 亚洲精品伦理在线| 视频一区欧美精品| 国产精品一区二区三区乱码| 国产1区2区3区精品美女| 成人app下载| 欧美理论在线播放| 精品久久久久久最新网址| 国产亚洲欧美色| 日韩一区欧美小说| 日韩二区三区在线观看| 国产一区在线看| 91无套直看片红桃| 日韩欧美国产精品一区| 国产精品毛片久久久久久久| 一区二区日韩电影| 国内精品视频666| 91福利社在线观看| 久久色在线观看| 亚洲一区二区在线观看视频| 国产综合久久久久影院| 色妹子一区二区| 精品国产伦一区二区三区观看体验| 国产精品国模大尺度视频| 同产精品九九九| 99精品欧美一区二区三区小说| 在线播放亚洲一区| 综合亚洲深深色噜噜狠狠网站| 日本欧美大码aⅴ在线播放| 99久久99久久免费精品蜜臀| 日韩欧美一级二级| 亚洲福利一区二区| 91在线视频官网| 久久―日本道色综合久久 | 666欧美在线视频| 国产精品电影一区二区三区| 久久综合综合久久综合| 在线观看国产精品网站| 国产亚洲精品aa午夜观看| 日韩不卡一区二区三区| 欧美视频三区在线播放| 最新高清无码专区| 成人午夜视频在线| 久久久久久久久伊人| 久久国产精品99精品国产| 欧美猛男男办公室激情| 一区二区日韩av| 一本到高清视频免费精品| 国产精品看片你懂得| 国产成人a级片| 国产日韩欧美在线一区| 国产一区二区在线视频| 欧美白人最猛性xxxxx69交| 麻豆视频一区二区| 欧美一区二区三区免费在线看 | 色欧美日韩亚洲| 亚洲精品视频一区| 99视频精品在线| 综合色天天鬼久久鬼色| 91片在线免费观看| 中文字幕日本不卡| 97se亚洲国产综合自在线| 国产精品丝袜久久久久久app| 国产不卡视频在线观看| 国产精品三级视频| 91在线国内视频| 亚洲免费观看在线视频| 欧美这里有精品| 亚洲成人动漫在线观看| 欧美丰满高潮xxxx喷水动漫| 麻豆国产精品视频| 欧美精品一区二区蜜臀亚洲| 国产成人午夜99999| 亚洲欧洲无码一区二区三区| 在线观看视频一区| 青青草97国产精品免费观看无弹窗版| 精品国产乱码久久久久久久久| 精品亚洲国内自在自线福利| 国产日韩欧美高清| 欧美在线观看视频一区二区三区| 亚洲成av人片一区二区| 欧美精品一区二区三区在线| 成人黄色片在线观看| 亚洲综合无码一区二区| 精品奇米国产一区二区三区| 成人黄色一级视频| 香蕉加勒比综合久久| 欧美变态tickling挠脚心| 成人黄色av网站在线| 亚洲国产欧美一区二区三区丁香婷| 欧美一级片免费看| 成人深夜福利app| 亚洲国产精品久久人人爱| www国产精品av| 色天天综合色天天久久| 国产一区二区三区视频在线播放| 日韩毛片视频在线看| 日韩欧美不卡一区| 91视频在线观看免费| 美国欧美日韩国产在线播放| 亚洲靠逼com| 亚洲精品在线观看网站| 欧美日韩国产123区| av亚洲精华国产精华精华| 青青草国产成人av片免费| 成人免费在线视频观看| 日韩欧美国产一区二区在线播放| 91色在线porny| 国产成人高清在线| 韩国v欧美v亚洲v日本v| 午夜激情综合网| 亚洲日本青草视频在线怡红院| 亚洲精品一区二区三区影院 | 国产夫妻精品视频| 五月婷婷欧美视频| 亚洲猫色日本管| 亚洲国产成人午夜在线一区| 欧美大片在线观看| 在线电影国产精品| 91传媒视频在线播放| 99久久婷婷国产综合精品电影 | 欧美色综合网站| 成人app网站| 不卡的av在线播放| 风间由美一区二区三区在线观看| 麻豆中文一区二区| 日韩电影在线免费| 日韩不卡一区二区| 视频一区国产视频| 偷拍一区二区三区| 日韩福利视频网| 美女视频免费一区| 久久精品国产久精国产| 精品一区二区三区视频| 看电影不卡的网站| 国产一区二区视频在线| 国产乱妇无码大片在线观看| 黄网站免费久久| 国产九色精品成人porny | 欧美午夜精品免费| 欧美亚洲自拍偷拍| 在线亚洲高清视频| 欧美日韩国产欧美日美国产精品| 欧美日韩国产首页| 欧美电影免费观看高清完整版在| 日韩欧美一级片| 久久久久久97三级| 国产精品剧情在线亚洲| 一区二区三区不卡视频| 午夜视黄欧洲亚洲| 久久99国产精品免费| 国产一区999| 色婷婷综合久久久| 欧美另类高清zo欧美| 久久色在线观看| 亚洲欧洲一区二区三区| 一区二区久久久| 免费欧美日韩国产三级电影| 国产原创一区二区三区| 99精品视频中文字幕| 欧美日韩一区二区在线视频| 欧美一区2区视频在线观看| 久久先锋影音av| 一区二区三区不卡在线观看| 免费视频一区二区| 国产成人精品综合在线观看| 91久久一区二区| 精品福利二区三区| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 亚洲精品视频在线看| 久久精品72免费观看| gogo大胆日本视频一区| 在线成人小视频| 国产精品久久久久婷婷二区次 | 欧美一级电影网站| 欧美激情综合网| 天堂午夜影视日韩欧美一区二区| 国产乱码精品一品二品| 欧美精品日韩精品| 中文字幕亚洲视频| 久久91精品久久久久久秒播|