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

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

?? powerspan.c

?? gumstiz u-boot loader in linux
?? 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一区二区三区免费野_久草精品视频
一本色道久久综合亚洲精品按摩| 久久嫩草精品久久久精品| 国模一区二区三区白浆| 日韩在线a电影| 日韩精品一卡二卡三卡四卡无卡| 亚洲日本在线观看| 亚洲蜜臀av乱码久久精品| 国产精品家庭影院| 亚洲欧美一区二区不卡| 亚洲精品亚洲人成人网在线播放| 亚洲女子a中天字幕| 亚洲一区二区三区视频在线| 一区二区不卡在线播放 | 91一区二区在线| 成人美女视频在线观看18| 粉嫩嫩av羞羞动漫久久久| 日本欧美在线看| 精品在线观看免费| 国产激情一区二区三区桃花岛亚洲| 国产一区日韩二区欧美三区| 成人性视频免费网站| 在线欧美小视频| 在线播放中文一区| 国产日产欧美精品一区二区三区| 亚洲国产岛国毛片在线| 一区二区三区加勒比av| 日本成人中文字幕在线视频| 久久成人免费网| 91欧美一区二区| 在线不卡a资源高清| 国产精品久久久久久久久免费相片 | 亚洲一区二区三区四区在线| 一区二区不卡在线视频 午夜欧美不卡在| 亚洲一区二区三区四区的 | 99re热这里只有精品视频| 国产成人在线电影| 91麻豆免费在线观看| 8x福利精品第一导航| 欧美精彩视频一区二区三区| 亚洲色图视频免费播放| 青椒成人免费视频| 一区二区激情小说| 美女视频一区二区| 一本高清dvd不卡在线观看| 欧美一区二区性放荡片| 欧美经典一区二区三区| 午夜精品久久久久| 成人免费高清视频| 欧美一区二区视频观看视频| 国产精品盗摄一区二区三区| 麻豆极品一区二区三区| 成人av午夜电影| 欧美一级久久久久久久大片| 日韩伦理免费电影| 狠狠色狠狠色综合日日91app| 日本韩国一区二区三区视频| 久久嫩草精品久久久久| 亚洲成人黄色小说| 国产一区二区美女| 欧美大片在线观看| 亚洲国产精品一区二区久久恐怖片| 高清视频一区二区| 久久综合九色综合久久久精品综合| 天天操天天干天天综合网| 色综合久久综合| 亚洲天堂精品视频| 99精品视频中文字幕| 日本一区二区高清| 国产超碰在线一区| 国产欧美综合色| 国产电影一区二区三区| 国产色产综合色产在线视频| 免费观看日韩av| 日韩欧美国产一区二区三区| 视频一区视频二区中文| 欧美一区二区三区人| 日本成人在线看| 91精品婷婷国产综合久久竹菊| 夜夜嗨av一区二区三区四季av| 色婷婷香蕉在线一区二区| 中文字幕在线不卡一区| 91亚洲国产成人精品一区二三| 中文字幕免费不卡在线| aaa亚洲精品一二三区| 亚洲三级理论片| 色婷婷亚洲精品| 亚洲成人av中文| 欧美一级日韩不卡播放免费| 久久不见久久见中文字幕免费| 91精品国产综合久久久久久久久久 | 久久蜜桃av一区二区天堂| 国产精品一区二区三区四区| 国产亚洲欧洲一区高清在线观看| 国产成人免费视频一区| 亚洲国产精华液网站w| 丰满亚洲少妇av| 中文字幕一区二区日韩精品绯色| 91麻豆swag| 日本亚洲视频在线| 国产欧美一区二区精品婷婷| 91女人视频在线观看| 日本在线不卡视频一二三区| 2023国产精品视频| 日本精品一级二级| 麻豆精品国产91久久久久久| 中文在线一区二区| 欧美性videosxxxxx| 久久精品72免费观看| 国产精品久久久久精k8| 正在播放亚洲一区| 成人精品视频一区二区三区尤物| 亚洲午夜一二三区视频| 久久久久成人黄色影片| 欧美三级午夜理伦三级中视频| 狠狠狠色丁香婷婷综合久久五月| 亚洲视频一二三区| 日韩欧美中文字幕精品| 9l国产精品久久久久麻豆| 蜜乳av一区二区| 亚洲三级电影网站| 久久久国产综合精品女国产盗摄| 在线观看区一区二| 国产aⅴ精品一区二区三区色成熟| 亚洲国产日韩av| 成人欧美一区二区三区白人| 日韩三级视频在线观看| 欧美三区在线观看| 91色九色蝌蚪| 丰满岳乱妇一区二区三区| 奇米四色…亚洲| 亚洲综合色婷婷| 精品乱人伦一区二区三区| 东方aⅴ免费观看久久av| 日本在线观看不卡视频| 一区二区三区四区亚洲| 国产精品久久久久影院色老大| 日韩免费看网站| 911精品产国品一二三产区| 色94色欧美sute亚洲13| 成人免费观看男女羞羞视频| 国产一区二区三区免费在线观看| 婷婷国产在线综合| 亚洲国产精品久久人人爱 | 欧美一区二区福利视频| 欧美日韩一本到| 欧美在线制服丝袜| 一本大道综合伊人精品热热| 成人av电影免费观看| 处破女av一区二区| 成人网在线播放| 波多野结衣的一区二区三区| 成人午夜精品一区二区三区| 国产激情偷乱视频一区二区三区| 国产美女在线精品| 国产乱人伦偷精品视频不卡| 国产精品香蕉一区二区三区| 国产真实精品久久二三区| 麻豆国产一区二区| 精品一区二区三区在线观看| 狠狠色狠狠色综合系列| 成人性生交大合| 99国产精品久| 欧美性猛交xxxxxxxx| 91麻豆精品国产91久久久久| 欧美一区二区二区| 欧美国产日韩在线观看| 亚洲色图一区二区三区| 亚洲超丰满肉感bbw| 美女视频免费一区| 粉嫩嫩av羞羞动漫久久久| 色综合天天性综合| 丝袜美腿成人在线| 亚洲福利一区二区| 麻豆精品一区二区综合av| 国产91清纯白嫩初高中在线观看 | 久久99精品久久久久婷婷| 国产裸体歌舞团一区二区| 不卡一区在线观看| 色吊一区二区三区| 成人精品免费看| 色婷婷av一区二区三区之一色屋| 欧美日韩久久不卡| 精品日本一线二线三线不卡| 久久精品人人做人人综合| 国产精品国产三级国产aⅴ入口 | 一区二区三区四区av| 天堂在线亚洲视频| 国产v日产∨综合v精品视频| 欧美三区免费完整视频在线观看| www欧美成人18+| 亚洲另类春色校园小说| 久久精品国产99| 日本高清不卡视频| 国产日产欧美一区二区三区| 香蕉久久一区二区不卡无毒影院| 国产毛片一区二区| 欧美在线小视频| 久久久蜜桃精品| 午夜免费久久看| 99免费精品视频|