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

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

?? intel28f128_16x2.c

?? umon bootloader source code, support mips cpu.
?? C
?? 第 1 頁 / 共 2 頁
字號:
		src1[0] = src[0];
		src1[1] = src[1];
		src1[2] = src[2];
		src1[3] = src[3];

		/* Flash program setup command */
		Write_40_to(dest);
		
		/* Write the value */
		FWrite(dest,src1);

		/* Wait for write to complete by polling RSR... */
		do {
			Write_70_to_base();
			rsr = Read_0000_from_base();
		} while (! (rsr & WSMS_H && rsr & WSMS_L));

		Write_50_to_base();		/* Clear status register */
		Write_ff_to_base();		/* Go to read-array mode */

		if (Is_Not_Equal(dest, src1)) {
			goto ewrite_again;
		}
		dest+=DEV_WIDTH;
		src+=DEV_WIDTH;
	}
	
	/* Now that the re-programming of flash is complete, reset: */
	reset = RESETFUNC();
	reset();

	return(0);	/* won't get here */
}

/* EndIntel28f128_16x2_ewrite():
 * Function place holder to determine the end of the above function.
 */
void
EndIntel28f128_16x2_ewrite(void)
{}

/* Intel28f128_16x2_lock():
 */
int
Intel28f128_16x2_lock(struct flashinfo *fdev,int snum,int operation)
{
	volatile int i;
	ulong	add, rsr;
	int		sector;

	add = (ulong)(fdev->base);

	if (operation == FLASH_LOCKABLE)
		return(1);

	if (operation == FLASH_LOCKQRY) {
		/* TODO: Write this */
		return(0);
	}

	/* Not applicable for this device.
	 */
	if (operation == FLASH_LOCKDWN)
		return(-1);

	/* For this device the unlock is applied to all
	 * sectors, so no need to enter the loop below.
	 */
	if (operation == FLASH_UNLOCK) {
			Write_60_to_base();
			Write_d0_to_base();

			/* Wait for unlock to complete by polling
			 * status register.
			 */
			do {
				for(i=0;i<SR_WAIT*10;i++);
				rsr = *(ulong *)add;
			} while(!(rsr & WSMS));
			for(i=0;i<SR_WAIT;i++);
			Write_ff_to_base();		/* Go to read-array mode */
		return(0);
	}

	/* Lock the requested sector(s):
	 */
	for (sector=0;sector<fdev->sectorcnt;sector++) {
		if ((snum == ALL_SECTORS) || (snum == sector)) {
			/* Issue the setup/lock command sequence
			 */
			Write_60_to(add);	
			Write_01_to(add);

			/* Wait for lock/unlock to complete by polling
			 * status register.
			 */
			do {
				for(i=0;i<SR_WAIT;i++);
				rsr = *(ulong *)add;
			} while(!(rsr & WSMS));
			Write_ff_to_base();		/* Go to read-array mode */
		}
		add += fdev->sectors[sector].size;
	}
	return(0);
}

/* EndIntel28f128_16x2_lock():
 * Function place holder to determine the end of the above function.
 */
void
EndIntel28f128_16x2_lock(void)
{
}
/* Intel28f128_16x2_type():
 * Run the AUTOSELECT algorithm to retrieve the manufacturer and
 * device id of the flash.
 */
int
Intel28f128_16x2_type(struct flashinfo *fdev)
{
	ushort	man, dev;
	ulong	id;

	/* Issue the read configuration command: */
	Write_90_to_base();

	man = (ushort)Read_0000_from_base();	/* manufacturer ID */
	dev = (ushort)Read_0001_from_base();	/* device ID */
	id = man;
	id <<= 16;
	id |= dev;

	fdev->id = id;

	/* Issue the read array command: */
	Write_ff_to_base();
	
	return((int)(fdev->id));
}

/* EndIntel28f128_16x2_type():
 * Function place holder to determine the end of the above function.
 */
void
EndIntel28f128_16x2_type(void)
{}

/**************************************************************************
 **************************************************************************
 *
 * The remainder of the code in this file can be included if the
 * target configuration is such that this 28F128 device is the only
 * real flash device in the system that is to be visible to the monitor.
 *
 **************************************************************************
 **************************************************************************
 */
#ifdef SINGLE_FLASH_DEVICE

/* FlashXXXFbuf[]:
 * If FLASH_COPY_TO_RAM is defined then these arrays will contain the
 * flash operation functions above.  To operate on most flash devices,
 * you cannot be executing out of it (there are exceptions, but
 * in general, we do not assume the flash supports this).  The flash
 * functions are copied here, then executed through the function
 * pointers established in the flashinfo structure below.
 * One obvious requirement...  The size of each array must be at least
 * as large as the function that it will contain.
 */
#ifdef FLASH_COPY_TO_RAM
ulong	FlashTypeFbuf[400];
ulong	FlashEraseFbuf[400];
ulong	FlashWriteFbuf[400];
ulong	FlashEwriteFbuf[400];
ulong	FlashLockFbuf[400];
#endif

/* FlashNamId[]:
 * Used to correlate between the ID and a string representing the name
 * of the flash device.
 */
struct flashdesc FlashNamId[] = {
	{ INTEL28F128J,		"INTEL-28F128J" },
	{ 0, 0 },
};

/* This configuration is 2 side-by-side 28F128J devices.
 * Each device has 128 128Kbyte sectors, so since we have 2
 * in parallel, then each 32-bit sector is 256Kbytes...
 */
int	SectorSizes28F128_32[] = {
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
	0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000, 0x40000,
};


struct sectorinfo sinfo128[sizeof(SectorSizes28F128_32)/sizeof(int)];

int
FlashBankInit(struct flashinfo *fbnk,int snum)
{
	uchar	*saddr;
	int		i, *sizetable, msize;
	struct	sectorinfo *sinfotbl;

	/* Based on the flash bank ID returned, load a sector count and a */
	/* sector size-information table... */
	flashtype(fbnk);
	switch(fbnk->id) {
		case INTEL28F128J:
			fbnk->sectorcnt = (sizeof(SectorSizes28F128_32)/sizeof(int));
			sizetable = SectorSizes28F128_32;
			break;
		default:
			printf("Unrecognized flashid: 0x%08lx\n",fbnk->id);
			return(-1);
			break;
	}

	/* Create the per-sector information table.  The size of the table */
	/* depends on the number of sectors in the device...  */
	if (fbnk->sectors)
		free((char *)fbnk->sectors);
	msize = fbnk->sectorcnt * (sizeof(struct sectorinfo));
	sinfotbl = (struct sectorinfo *)malloc(msize);
	if (!sinfotbl) {
		printf("Can't allocate space for flash sector information\n");
		return(-1);
	}
	fbnk->sectors = sinfotbl;

	/* Using the above-determined sector count and size table, build */
	/* the sector information table as part of the flash-bank structure: */
	saddr = fbnk->base;
	for(i=0;i<fbnk->sectorcnt;i++) {
		fbnk->sectors[i].snum = snum+i;
		fbnk->sectors[i].size = sizetable[i];
		fbnk->sectors[i].begin = saddr;
		fbnk->sectors[i].end =
		    fbnk->sectors[i].begin + fbnk->sectors[i].size - 1;
		fbnk->sectors[i].protected = 0;
		saddr += sizetable[i];
	}
	fbnk->end = saddr-1;
	return(fbnk->sectorcnt);
}

/* FlashInit():
 * Initialize data structures for each bank of flash...
 */
int
FlashInit(void)
{
	int		snum;
	struct	flashinfo *fbnk;

	snum = 0;
	FlashCurrentBank = 0;

#ifdef FLASH_COPY_TO_RAM

	/* Copy functions to ram space... */
	/* Note that this MUST be done when cache is disabled to assure that */
	/* the RAM is occupied by the designated block of code. */

	if (flashopload((ulong *)Intel28f128_16x2_lock,
		(ulong *)EndIntel28f128_16x2_lock,
		FlashLockFbuf,sizeof(FlashLockFbuf)) < 0)
		return(-1);
	if (flashopload((ulong *)Intel28f128_16x2_type,
		(ulong *)EndIntel28f128_16x2_type,
		FlashTypeFbuf,sizeof(FlashTypeFbuf)) < 0)
		return(-1);
	if (flashopload((ulong *)Intel28f128_16x2_erase,
		(ulong *)EndIntel28f128_16x2_erase,
		FlashEraseFbuf,sizeof(FlashEraseFbuf)) < 0)
		return(-1);
	if (flashopload((ulong *)Intel28f128_16x2_ewrite,
		(ulong *)EndIntel28f128_16x2_ewrite,
		FlashEwriteFbuf,sizeof(FlashEwriteFbuf)) < 0)
		return(-1);
	if (flashopload((ulong *)Intel28f128_16x2_write,
		(ulong *)EndIntel28f128_16x2_write,
		FlashWriteFbuf,sizeof(FlashWriteFbuf)) < 0)
		return(-1);

#endif

	fbnk = &FlashBank[0];
	fbnk->base = (unsigned char *)FLASH_BANK0_BASE_ADDR;
	fbnk->width = FLASH_BANK0_WIDTH;
#ifdef FLASH_COPY_TO_RAM
	fbnk->fltype = (int(*)())FlashTypeFbuf;		/* flashtype(). */
	fbnk->flerase = (int(*)())FlashEraseFbuf;	/* flasherase(). */
	fbnk->flwrite = (int(*)())FlashWriteFbuf;	/* flashwrite(). */
	fbnk->flewrite = (int(*)())FlashEwriteFbuf;	/* flashewrite(). */
	fbnk->fllock = (int(*)())FlashLockFbuf;		/* flashlock(). */
#else
	fbnk->fltype = Intel28f128_16x2_type;
	fbnk->flerase = Intel28f128_16x2_erase;
	fbnk->fllock = Intel28f128_16x2_lock;
	fbnk->flwrite = Intel28f128_16x2_write;
	fbnk->flewrite = Intel28f128_16x2_ewrite;
#endif

	snum += FlashBankInit(fbnk,snum);

	sectorProtect(FLASH_PROTECT_RANGE,1);

#ifdef FLASHRAM_BASE
	FlashRamInit(snum, FLASHRAM_SECTORCOUNT,
		&FlashBank[FLASHRAM_BANKNUM], sinfoRAM, 0);
#endif
	return(0);
}

#endif	/* SINGLE_FLASH_DEVICE */

#endif	/* INCLUDE_FLASH */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本欧美加勒比视频| 精品国产免费一区二区三区香蕉| 欧美日韩一级大片网址| 911精品国产一区二区在线| 日韩欧美www| 国产精品久久久久毛片软件| 国产精品国产a级| 亚洲大片免费看| 精品中文av资源站在线观看| eeuss影院一区二区三区| 欧美日韩在线播放一区| 久久久不卡网国产精品二区| 一区二区三区欧美视频| 久久aⅴ国产欧美74aaa| 91色porny蝌蚪| 日韩欧美一区二区免费| 中文字幕一区在线观看| 日韩和的一区二区| av成人老司机| 日韩美女主播在线视频一区二区三区| 中文字幕一区二区在线观看 | 国产1区2区3区精品美女| 色婷婷亚洲综合| 久久久午夜精品| 亚洲成在人线免费| 成人精品高清在线| 日韩午夜激情免费电影| 亚洲欧美一区二区三区极速播放| 另类小说视频一区二区| 一本一道久久a久久精品| www久久精品| 日韩一区精品视频| 日本韩国欧美在线| 国产校园另类小说区| 日日夜夜精品视频免费| 99久久免费国产| 久久人人97超碰com| 亚洲国产精品精华液网站| 成人午夜在线播放| 精品国产乱码久久久久久免费| 亚洲已满18点击进入久久| 国产精品一区2区| 欧美大片在线观看一区二区| 亚洲www啪成人一区二区麻豆| 成人免费黄色在线| 精品第一国产综合精品aⅴ| 亚洲第一二三四区| 在线视频你懂得一区二区三区| 欧美国产精品一区| 国产又黄又大久久| 欧美不卡123| 美女视频黄a大片欧美| 欧美喷潮久久久xxxxx| 亚洲精品中文在线观看| 成人精品鲁一区一区二区| 国产亚洲精品精华液| 久久99国内精品| 日韩一区二区三区免费看 | 在线精品视频免费播放| 国产精品超碰97尤物18| 国产成人精品网址| 久久久午夜精品理论片中文字幕| 久久99国产精品久久99 | 久久国产精品免费| 欧美一级免费大片| 日韩二区在线观看| 91麻豆精品91久久久久久清纯| 一区二区三区欧美激情| 色偷偷久久一区二区三区| 专区另类欧美日韩| 99久久精品国产精品久久| 国产精品久久久久婷婷| 99久久99久久精品免费看蜜桃| 国产精品毛片无遮挡高清| 成人免费毛片app| 日韩一区日韩二区| 91在线porny国产在线看| 亚洲免费观看高清在线观看| 91香蕉视频mp4| 一区二区三区日韩精品视频| 欧美无砖专区一中文字| 婷婷久久综合九色国产成人| 欧美日本视频在线| 麻豆精品久久精品色综合| 26uuu国产在线精品一区二区| 国产精品一线二线三线| 国产欧美日韩精品一区| 99久久精品国产毛片| 亚洲一区二区三区四区的| 欧美日韩在线综合| 麻豆一区二区三| 久久夜色精品国产噜噜av| 国产成人精品影视| 亚洲欧美日韩中文字幕一区二区三区| 欧美性生交片4| 日本欧美加勒比视频| 久久精品一区四区| 色综合久久中文综合久久牛| 亚洲国产精品久久久男人的天堂| 欧美一级黄色录像| 国产精品正在播放| 亚洲美女视频一区| 91精品国产91热久久久做人人| 精品一区二区三区av| 国产精品二区一区二区aⅴ污介绍| 色综合久久久久综合99| 日韩av一级片| 国产欧美日韩久久| 欧美色综合天天久久综合精品| 免费久久99精品国产| 国产嫩草影院久久久久| 欧美亚洲一区二区在线观看| 免费成人小视频| 国产精品久久久久久久久动漫| 欧美亚日韩国产aⅴ精品中极品| 久久精品国产在热久久| 国产精品久久久久毛片软件| 制服丝袜激情欧洲亚洲| 成人午夜电影久久影院| 午夜精品久久久久久久| 国产欧美日韩三区| 欧美日本一区二区三区四区| 国产成人免费在线观看| 亚洲成人午夜电影| 日韩女优电影在线观看| 91麻豆自制传媒国产之光| 日韩av在线播放中文字幕| 中文字幕在线不卡视频| 欧美一区二区私人影院日本| 波多野结衣中文一区| 日韩有码一区二区三区| 中文字幕一区二区三区av| 日韩三级视频在线观看| 91免费版pro下载短视频| 精东粉嫩av免费一区二区三区 | 欧美性受极品xxxx喷水| 国产麻豆精品theporn| 亚洲自拍偷拍网站| 国产精品嫩草久久久久| 日韩精品专区在线| 欧美三级韩国三级日本一级| 东方aⅴ免费观看久久av| 蜜臂av日日欢夜夜爽一区| 亚洲免费在线观看视频| 久久久久9999亚洲精品| 欧美电影一区二区三区| 91免费精品国自产拍在线不卡| 久久66热偷产精品| 偷拍日韩校园综合在线| 亚洲乱码日产精品bd| 中文字幕久久午夜不卡| 日韩色在线观看| 欧美另类高清zo欧美| 色综合视频在线观看| 成人性生交大片免费| 国产在线精品不卡| 美女在线视频一区| 日韩精品一卡二卡三卡四卡无卡| 亚洲欧美色图小说| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 欧美大黄免费观看| 7777精品伊人久久久大香线蕉| 欧美亚洲综合另类| 在线观看91视频| 色菇凉天天综合网| 97国产精品videossex| 国产91精品一区二区| 国产真实乱对白精彩久久| 青草国产精品久久久久久| 天天综合天天做天天综合| 亚洲午夜电影在线| 亚洲丰满少妇videoshd| 亚洲福利视频一区| 亚洲影视在线播放| 亚洲成av人片在线| 视频一区视频二区中文字幕| 午夜精品福利久久久| 天天综合天天综合色| 日本中文在线一区| 秋霞影院一区二区| 美女被吸乳得到大胸91| 免费一级欧美片在线观看| 麻豆精品新av中文字幕| 精品制服美女久久| 国产一区91精品张津瑜| 国产精品一区二区久久不卡 | |精品福利一区二区三区| 国产精品理论片| 亚洲伦理在线免费看| 亚洲一区二区四区蜜桃| 亚洲一卡二卡三卡四卡| 午夜天堂影视香蕉久久| 日韩精品免费视频人成| 久久电影网站中文字幕| 狠狠网亚洲精品| 成人午夜在线视频| 91久久精品一区二区三区| 日本精品一级二级| 91麻豆精品国产自产在线观看一区| 91麻豆精品国产91久久久资源速度 |