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

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

?? powerspan.c

?? 友善mini2440嵌入式
?? C
?? 第 1 頁 / 共 2 頁
字號:
	unsigned char default_eeprom[] = EEPROM_DEFAULT;	if (argc < 2) {		goto usage;	}	cmd = argv[1][0];	if (argc > 2) {		address = simple_strtoul (argv[2], NULL, 16);		if (argc > 3) {			value = simple_strtoul (argv[3], NULL, 16) & 0xFF;		}	}	switch (cmd) {	case 'r':		if (address > 256) {			printf ("Illegal Address\n");			goto usage;		}		printf ("@0x%x: ", address);		for (ii = 0; ii < value; ii++) {			if (EEPROMRead (address + ii, &read_value) !=			    0) {				printf ("Read Error\n");			} else {				printf ("0x%02x ", read_value);			}			if (((ii + 1) % 16) == 0) {				printf ("\n");			}		}		printf ("\n");		break;	case 'w':		if (address > 256) {			printf ("Illegal Address\n");			goto usage;		}		if (argc < 4) {			goto usage;		}		if (EEPROMWrite (address, value) != 0) {			printf ("Write Error\n");		}		break;	case 'g':		if (argc != 3) {			goto usage;		}		mem_ptr = (unsigned char *) address;		for (ii = 0; ((ii < EEPROM_LENGTH) && (error == 0));		     ii++) {			if (EEPROMRead (ii, &read_value) != 0) {				printf ("Read Error\n");				error = 1;			} else {				*mem_ptr = read_value;				mem_ptr++;			}		}		break;	case 'p':		if (argc != 3) {			goto usage;		}		mem_ptr = (unsigned char *) address;		for (ii = 0; ((ii < EEPROM_LENGTH) && (error == 0));		     ii++) {			if (EEPROMWrite (ii, *mem_ptr) != 0) {				printf ("Write Error\n");				error = 1;			}			mem_ptr++;		}		break;	case 'd':		if (argc != 2) {			goto usage;		}		for (ii = 0; ((ii < EEPROM_LENGTH) && (error == 0));		     ii++) {			if (EEPROMWrite (ii, default_eeprom[ii]) != 0) {				printf ("Write Error\n");				error = 1;			}		}		break;	default:		goto usage;	}	goto done;      usage:	printf ("Usage:\n%s\n", cmdtp->help);      done:	return ret_val;}U_BOOT_CMD (eeprom, 4, 0, do_eeprom,	    "eeprom  - read/write/copy to/from the PowerSpan II eeprom\n",	    "eeprom r OFF [NUM]\n"	    "    - read NUM words starting at OFF\n"	    "eeprom w OFF VAL\n"	    "    - write word VAL at offset OFF\n"	    "eeprom g ADD\n"	    "    - store contents of eeprom at address ADD\n"	    "eeprom p ADD\n"	    "    - put data stored at address ADD into the eeprom\n"	    "eeprom d\n" "    - return eeprom to default contents\n");unsigned int PowerSpanRead (unsigned int theOffset){	volatile unsigned int *ptr =		(volatile unsigned int *) (PSPAN_BASEADDR + theOffset);	unsigned int ret_val;#ifdef VERBOSITY	if (gVerbosityLevel > 1) {		printf ("PowerSpanRead: offset=%08x ", theOffset);	}#endif	ret_val = *ptr;	PSII_SYNC ();#ifdef VERBOSITY	if (gVerbosityLevel > 1) {		printf ("value=%08x\n", ret_val);	}#endif	return ret_val;}void PowerSpanWrite (unsigned int theOffset, unsigned int theValue){	volatile unsigned int *ptr =		(volatile unsigned int *) (PSPAN_BASEADDR + theOffset);#ifdef VERBOSITY	if (gVerbosityLevel > 1) {		printf ("PowerSpanWrite: offset=%08x val=%02x\n", theOffset,			theValue);	}#endif	*ptr = theValue;	PSII_SYNC ();}/** * Sets the indicated bits in the indicated register. * @param theOffset [IN] the register to access. * @param theMask   [IN] bits set in theMask will be set in the register. */void PowerSpanSetBits (unsigned int theOffset, unsigned int theMask){	volatile unsigned int *ptr =		(volatile unsigned int *) (PSPAN_BASEADDR + theOffset);	unsigned int register_value;#ifdef VERBOSITY	if (gVerbosityLevel > 1) {		printf ("PowerSpanSetBits: offset=%08x mask=%02x\n",			theOffset, theMask);	}#endif	register_value = *ptr;	PSII_SYNC ();	register_value |= theMask;	*ptr = register_value;	PSII_SYNC ();}/** * Clears the indicated bits in the indicated register. * @param theOffset [IN] the register to access. * @param theMask   [IN] bits set in theMask will be cleared in the register. */void PowerSpanClearBits (unsigned int theOffset, unsigned int theMask){	volatile unsigned int *ptr =		(volatile unsigned int *) (PSPAN_BASEADDR + theOffset);	unsigned int register_value;#ifdef VERBOSITY	if (gVerbosityLevel > 1) {		printf ("PowerSpanClearBits: offset=%08x mask=%02x\n",			theOffset, theMask);	}#endif	register_value = *ptr;	PSII_SYNC ();	register_value &= ~theMask;	*ptr = register_value;	PSII_SYNC ();}/** * Configures a slave image on the local bus, based on the parameters and some hardcoded system values. * Slave Images are images that cause the PowerSpan II to be a master on the PCI bus.  Thus, they *  are outgoing from the standpoint of the local bus. * @param theImageIndex    [IN] the PowerSpan II image to set (assumed to be 0-7). * @param theBlockSize     [IN] the block size of the image (as used by PowerSpan II: PB_SIx_CTL[BS]). * @param theMemIOFlag     [IN] if PX_TGT_USE_MEM_IO, this image will have the MEM_IO bit set. * @param theEndianness    [IN] the endian bits for the image (already shifted, use defines). * @param theLocalBaseAddr [IN] the Local address for the image (assumed to be valid with provided block size). * @param thePCIBaseAddr   [IN] the PCI address for the image (assumed to be valid with provided block size). */int SetSlaveImage (int theImageIndex, unsigned int theBlockSize,		   int theMemIOFlag, int theEndianness,		   unsigned int theLocalBaseAddr, unsigned int thePCIBaseAddr){	unsigned int reg_offset = theImageIndex * PB_SLAVE_IMAGE_OFF;	unsigned int reg_value = 0;	/* Make sure that the Slave Image is disabled */	PowerSpanClearBits ((REGS_PB_SLAVE_CSR + reg_offset),			    PB_SLAVE_CSR_IMG_EN);	/* Setup the mask required for requested PB Slave Image configuration */	reg_value = PB_SLAVE_CSR_TA_EN | theEndianness | (theBlockSize << 24);	if (theMemIOFlag == PB_SLAVE_USE_MEM_IO) {		reg_value |= PB_SLAVE_CSR_MEM_IO;	}	/* hardcoding the following:	   TA_EN = 1	   MD_EN = 0	   MODE  = 0	   PRKEEP = 0	   RD_AMT = 0	 */	PowerSpanWrite ((REGS_PB_SLAVE_CSR + reg_offset), reg_value);	/* these values are not checked by software */	PowerSpanWrite ((REGS_PB_SLAVE_BADDR + reg_offset), theLocalBaseAddr);	PowerSpanWrite ((REGS_PB_SLAVE_TADDR + reg_offset), thePCIBaseAddr);	/* Enable the Slave Image */	PowerSpanSetBits ((REGS_PB_SLAVE_CSR + reg_offset),			  PB_SLAVE_CSR_IMG_EN);	return 0;}/** * Configures a target image on the local bus, based on the parameters and some hardcoded system values. * Target Images are used when the PowerSpan II is acting as a target for an access.  Thus, they *  are incoming from the standpoint of the local bus. * In order to behave better on the host PCI bus, if thePCIBaseAddr is NULL (0x00000000), then the PCI *  base address will not be updated; makes sense given that the hosts own memory should be mapped to *  PCI address 0x00000000. * @param theImageIndex    [IN] the PowerSpan II image to set. * @param theBlockSize     [IN] the block size of the image (as used by PowerSpan II: Px_TIx_CTL[BS]). * @param theMemIOFlag     [IN] if PX_TGT_USE_MEM_IO, this image will have the MEM_IO bit set. * @param theEndianness    [IN] the endian bits for the image (already shifted, use defines). * @param theLocalBaseAddr [IN] the Local address for the image (assumed to be valid with provided block size). * @param thePCIBaseAddr   [IN] the PCI address for the image (assumed to be valid with provided block size). */int SetTargetImage (int theImageIndex, unsigned int theBlockSize,		    int theMemIOFlag, int theEndianness,		    unsigned int theLocalBaseAddr,		    unsigned int thePCIBaseAddr){	unsigned int csr_reg_offset = theImageIndex * P1_TGT_IMAGE_OFF;	unsigned int pci_reg_offset = theImageIndex * P1_BST_OFF;	unsigned int reg_value = 0;	/* Make sure that the Slave Image is disabled */	PowerSpanClearBits ((REGS_P1_TGT_CSR + csr_reg_offset),			    PB_SLAVE_CSR_IMG_EN);	/* Setup the mask required for requested PB Slave Image configuration */	reg_value =		PX_TGT_CSR_TA_EN | PX_TGT_CSR_BAR_EN | (theBlockSize << 24) |		PX_TGT_CSR_RTT_READ | PX_TGT_CSR_WTT_WFLUSH | theEndianness;	if (theMemIOFlag == PX_TGT_USE_MEM_IO) {		reg_value |= PX_TGT_MEM_IO;	}	/* hardcoding the following:	   TA_EN = 1	   BAR_EN = 1	   MD_EN = 0	   MODE  = 0	   DEST  = 0	   RTT = 01010	   GBL = 0	   CI = 0	   WTT = 00010	   PRKEEP = 0	   MRA = 0	   RD_AMT = 0	 */	PowerSpanWrite ((REGS_P1_TGT_CSR + csr_reg_offset), reg_value);	PowerSpanWrite ((REGS_P1_TGT_TADDR + csr_reg_offset),			theLocalBaseAddr);	if (thePCIBaseAddr != (unsigned int) NULL) {		PowerSpanWrite ((REGS_P1_BST + pci_reg_offset),				thePCIBaseAddr);	}	/* Enable the Slave Image */	PowerSpanSetBits ((REGS_P1_TGT_CSR + csr_reg_offset),			  PB_SLAVE_CSR_IMG_EN);	return 0;}int do_bridge (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]){	char cmd;	int ret_val = 1;	unsigned int image_index;	unsigned int block_size;	unsigned int mem_io;	unsigned int local_addr;	unsigned int pci_addr;	int endianness;	if (argc != 8) {		goto usage;	}	cmd = argv[1][0];	image_index = simple_strtoul (argv[2], NULL, 16);	block_size = simple_strtoul (argv[3], NULL, 16);	mem_io = simple_strtoul (argv[4], NULL, 16);	endianness = argv[5][0];	local_addr = simple_strtoul (argv[6], NULL, 16);	pci_addr = simple_strtoul (argv[7], NULL, 16);	switch (cmd) {	case 'i':		if (tolower (endianness) == 'b') {			endianness = PX_TGT_CSR_BIG_END;		} else if (tolower (endianness) == 'l') {			endianness = PX_TGT_CSR_TRUE_LEND;		} else {			goto usage;		}		SetTargetImage (image_index, block_size, mem_io,				endianness, local_addr, pci_addr);		break;	case 'o':		if (tolower (endianness) == 'b') {			endianness = PB_SLAVE_CSR_BIG_END;		} else if (tolower (endianness) == 'l') {			endianness = PB_SLAVE_CSR_TRUE_LEND;		} else {			goto usage;		}		SetSlaveImage (image_index, block_size, mem_io,			       endianness, local_addr, pci_addr);		break;	default:		goto usage;	}	goto done;usage:	printf ("Usage:\n%s\n", cmdtp->help);done:	return ret_val;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线观看网站| 一区二区三区在线播| 99国产精品国产精品毛片| 午夜天堂影视香蕉久久| 国产亚洲福利社区一区| 欧美日韩精品一区二区天天拍小说 | 欧美一区二区女人| 9i看片成人免费高清| 久久国产精品色| 亚洲一区在线视频观看| 国产免费久久精品| 日韩午夜精品电影| 欧美三级资源在线| 成人网在线免费视频| 精品一区二区国语对白| 亚洲第一主播视频| 有坂深雪av一区二区精品| 欧美高清一级片在线观看| 精品国产精品一区二区夜夜嗨| 在线观看亚洲成人| 99vv1com这只有精品| 国产在线不卡一卡二卡三卡四卡| 天堂av在线一区| 一区二区三区四区视频精品免费| 欧美经典一区二区三区| 日韩精品一区二区三区视频播放| 精品视频在线免费| 一本大道久久a久久综合| 成人综合在线视频| 国产精品亚洲第一区在线暖暖韩国| 日韩不卡一二三区| 日本不卡视频一二三区| 亚洲www啪成人一区二区麻豆| 夜夜嗨av一区二区三区中文字幕 | 亚洲一区免费在线观看| 成人欧美一区二区三区黑人麻豆| 久久精品一二三| 久久久亚洲国产美女国产盗摄| 欧美tickling网站挠脚心| 欧美xxxxx牲另类人与| 日韩一区二区电影| 精品三级av在线| 欧美va在线播放| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 一区二区三区日韩欧美精品| 亚洲人妖av一区二区| 亚洲欧洲99久久| 综合激情网...| 亚洲综合色婷婷| 亚洲国产日韩一区二区| 婷婷成人激情在线网| 石原莉奈在线亚洲三区| 美女www一区二区| 韩国av一区二区三区四区| 国产精品一区二区不卡| 丁香啪啪综合成人亚洲小说 | 91蝌蚪porny九色| 欧亚一区二区三区| 欧美美女一区二区| 在线成人小视频| 日韩精品一区二区三区中文不卡| 精品国产自在久精品国产| 国产无人区一区二区三区| 国产精品进线69影院| 一区二区三区四区国产精品| 午夜精品久久久久久久99水蜜桃 | 日本一区二区免费在线观看视频| 国产精品久久久久天堂| 亚洲影视在线观看| 蜜桃av噜噜一区二区三区小说| 国产伦精品一区二区三区免费 | 国内精品伊人久久久久影院对白| 国产精品一区二区三区四区| 99久久久国产精品| 91精品国产免费| 国产欧美综合在线观看第十页| 国产精品电影一区二区| 亚洲午夜羞羞片| 久久疯狂做爰流白浆xx| hitomi一区二区三区精品| 欧美日韩一卡二卡| 久久久久久一级片| 一级日本不卡的影视| 国产在线播精品第三| 91成人网在线| 国产亚洲一区二区三区在线观看| 亚洲另类色综合网站| 久久狠狠亚洲综合| 色94色欧美sute亚洲线路一久| 日韩一区二区不卡| 玉足女爽爽91| 国产精品白丝jk黑袜喷水| 色呦呦网站一区| 久久久www免费人成精品| 亚洲国产精品久久人人爱| 国产乱国产乱300精品| 欧美视频一区二区三区四区| 国产日产欧美一区二区视频| 天天色天天爱天天射综合| 99久久精品一区| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲一线二线三线久久久| 成人午夜视频福利| 日韩欧美精品在线| 一区二区三区日韩精品| 高清不卡在线观看| 欧美mv日韩mv亚洲| 五月婷婷另类国产| 91在线视频播放地址| 国产女主播在线一区二区| 日韩不卡在线观看日韩不卡视频| 91浏览器打开| 国产精品久线观看视频| 激情伊人五月天久久综合| 欧美日韩在线一区二区| 亚洲欧美一区二区三区极速播放| 国产成人免费在线观看| 欧美精品一区二区蜜臀亚洲| 日韩成人伦理电影在线观看| 在线观看视频一区二区| 亚洲欧美色图小说| 成人污视频在线观看| 国产三级一区二区| 国产一区二区视频在线播放| 日韩一区二区在线观看| 午夜一区二区三区在线观看| 欧美在线视频日韩| 亚洲日本va在线观看| 91亚洲国产成人精品一区二三| 久久精品欧美日韩精品| 国产福利一区二区三区视频 | 亚洲一区二区在线播放相泽| 一本色道**综合亚洲精品蜜桃冫| **欧美大码日韩| 色综合久久99| 亚洲免费色视频| 欧美艳星brazzers| 亚洲成人激情社区| 欧美日韩国产首页| 秋霞午夜鲁丝一区二区老狼| 欧美精选午夜久久久乱码6080| 午夜精品一区二区三区电影天堂| 欧美日韩一区二区在线观看视频| 亚洲国产精品一区二区久久| 欧美日韩亚洲不卡| 日本伊人色综合网| 日韩欧美电影在线| 国产真实精品久久二三区| 久久久www成人免费毛片麻豆| 国产精品18久久久久久久久 | caoporm超碰国产精品| 国产精品久久久久毛片软件| av综合在线播放| 一区二区三区四区国产精品| 欧美久久久影院| 精品伊人久久久久7777人| 欧美高清在线一区| 在线精品视频免费播放| 五月综合激情日本mⅴ| 日韩美女主播在线视频一区二区三区 | 中文av一区二区| 91在线视频网址| 婷婷久久综合九色综合伊人色| 欧美刺激午夜性久久久久久久 | 麻豆一区二区三区| 久久久久久一级片| 色狠狠综合天天综合综合| 亚洲成在人线免费| 欧美成人vr18sexvr| 成人国产精品免费| 亚洲第一会所有码转帖| 久久综合av免费| 91色视频在线| 亚洲v日本v欧美v久久精品| 2022国产精品视频| 91麻豆福利精品推荐| 蜜桃91丨九色丨蝌蚪91桃色| 国产精品久久久一本精品| 在线国产电影不卡| 国内外成人在线| 亚洲精品第1页| 久久一区二区视频| 91美女片黄在线| 免费成人在线播放| 亚洲欧洲在线观看av| 欧美日韩黄色一区二区| 国产精品一卡二卡在线观看| 亚洲一区二区三区四区在线免费观看 | 欧美在线你懂得| 久草精品在线观看| 一区二区三区91| 久久婷婷一区二区三区| 欧美在线视频不卡| 成人av网址在线观看| 男人的j进女人的j一区| 综合欧美亚洲日本| 欧美电影免费观看高清完整版| 一本久久精品一区二区| 国产麻豆午夜三级精品| 日韩影院免费视频|