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

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

?? flashdev.c

?? umon bootloader source code, support mips cpu.
?? C
字號:
/* This file contains all of the flash support code that does not need
   to be relocated to RAM.  Two separate files (flash.c and flashpic.c)
   are maintained because under certain compilers, they may need to be
   compiled with different options to be made position independent.

   NOTE: THESE FUNCTIONS ARE NOT RE-ENTRANT!!!  All of the FLASH routines
   assume they can copy themselves into the array FlashFunc[]; hence, only
   one operation can be active at any time.
*/
#include "config.h"
#if INCLUDE_FLASH
#include "cpu.h"
#include "flashdev.h"
#include "flash.h"
#include "genlib.h"

typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned long ulong;
typedef volatile unsigned char vuchar;
typedef volatile unsigned short vushort;
typedef volatile unsigned long vulong;
typedef volatile unsigned int vuint;
typedef volatile int vint;

extern int Flashlock16();
extern int EndFlashlock16();
extern int Flashtype16();
extern int EndFlashtype16();
extern int Flashwrite16();
extern int EndFlashwrite16();
extern int Flashewrite16();
extern int EndFlashewrite16();
extern int Flasherase16();
extern int EndFlasherase16();

extern int		FlashProtectWindow;
extern int		FlashCurrentBank;
extern int		flashopload(), flashtype();
extern struct	flashinfo FlashBank[FLASHBANKS];

/* FlashXXXFbuf[]:
   These arrays will contain the flash operation function that is executing.
   Recall that to operate on the flash, you cannot be executing out of it.
   The flash functions are copied here, then executed through the function
   pointer flashfunc which is set to point to FlashFunc.
*/
ulong    FlashLockFbuf[FLASHFUNCSIZE];
ulong    FlashTypeFbuf[FLASHFUNCSIZE];
ulong    FlashEraseFbuf[FLASHFUNCSIZE];
ulong    FlashWriteFbuf[FLASHFUNCSIZE];
ulong    FlashEwriteFbuf[FLASHFUNCSIZE];

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

int	SectorSizes800B[] = {	/* 23 sectors */
	0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000
};

int	SectorSizes160B[] = {	/* 39 sectors */
	0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000
};

int	SectorSizes320B[] = {	/* 71 sectors */
	0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000,
	0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000
};

/* FlashBankInit():
   Initialize flash structures and determine flash device type.
*/
int
FlashBankInit(struct flashinfo *fbnk,int snum)
{
	uchar	*saddr;
	int	i, *sizetable, msize;
	struct	sectorinfo *sinfotbl;

	sizetable = 0;

	/* Based on the flash bank ID returned, load a sector count and a */
	/* sector size-information table... */
	flashtype(fbnk);
	switch(fbnk->id) {
		case INTEL28F800B:
			fbnk->sectorcnt = 23;
			sizetable = SectorSizes800B;
			break;
		case INTEL28F160B:
			fbnk->sectorcnt = 39;
			sizetable = SectorSizes160B;
			break;
		case INTEL28F320B:
			fbnk->sectorcnt = 71;
			sizetable = SectorSizes320B;
			break;
		default:
			printf("Unrecognized flashid: 0x%04x\n",(ushort)(fbnk->id));
			return(-1);
	}

	/* 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()
{
	int	snum;
	struct	flashinfo *fbnk;

	snum = 0;
	FlashCurrentBank = 0;

	/* 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 *)FLASHLOCK,(ulong *)ENDFLASHLOCK,
		FlashLockFbuf,sizeof(FlashLockFbuf)) < 0)
		return(-1);
	if (flashopload((ulong *)FLASHTYPE,(ulong *)ENDFLASHTYPE,
		FlashTypeFbuf,sizeof(FlashTypeFbuf)) < 0)
		return(-1);
	if (flashopload((ulong *)FLASHERASE,(ulong *)ENDFLASHERASE,
		FlashEraseFbuf,sizeof(FlashEraseFbuf)) < 0)
		return(-1);
	if (flashopload((ulong *)FLASHEWRITE,(ulong *)ENDFLASHEWRITE,
		FlashEwriteFbuf,sizeof(FlashEwriteFbuf)) < 0)
		return(-1);
	if (flashopload((ulong *)FLASHWRITE,(ulong *)ENDFLASHWRITE,
		FlashWriteFbuf,sizeof(FlashWriteFbuf)) < 0)
		return(-1);

	fbnk = &FlashBank[0];
	fbnk->base = (unsigned char *)FLASH_BANK0_BASE_ADDR;
	fbnk->width = FLASH_BANK0_WIDTH;
	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(). */
	snum += FlashBankInit(fbnk,snum);

	/* This line should probably be removed once TFS is working: */
	flashlock(fbnk,ALL_SECTORS,FLASH_UNLOCK);

	sectorProtect(FLASH_PROTECT_RANGE,1);

	/* Additional flash memory banks would be initialized here... */
	return(0);
}

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99re这里都是精品| 亚洲精品在线网站| 亚洲国产成人va在线观看天堂| 99视频超级精品| 日韩理论片一区二区| 成人av资源在线观看| 1000部国产精品成人观看| 色综合久久久久网| 五月天激情小说综合| 日韩一级二级三级精品视频| 国内不卡的二区三区中文字幕| 国产亚洲精品aa午夜观看| 国产精品一二三四五| 欧美国产禁国产网站cc| 成人国产一区二区三区精品| 亚洲码国产岛国毛片在线| 欧美日韩一区二区电影| 美女mm1313爽爽久久久蜜臀| 国产性做久久久久久| 欧美在线免费观看亚洲| 理论片日本一区| 国产精品电影一区二区| 欧美日韩国产一区二区三区地区| 老司机免费视频一区二区| 欧美韩国日本不卡| 欧美日韩国产经典色站一区二区三区| 蜜臀99久久精品久久久久久软件| 国产精品网曝门| 欧美日韩免费电影| 国产91对白在线观看九色| 亚洲国产乱码最新视频 | 成人免费看视频| 亚洲一区在线观看视频| 久久久精品国产免大香伊| 色猫猫国产区一区二在线视频| 香蕉久久夜色精品国产使用方法| 日韩一区二区在线观看| 99国产精品视频免费观看| 天堂资源在线中文精品| 国产视频一区在线播放| 欧美在线综合视频| 成人精品视频一区二区三区尤物| 肉肉av福利一精品导航| 最新国产の精品合集bt伙计| 精品久久一区二区三区| 欧美少妇bbb| av不卡在线播放| 国产在线精品不卡| 日韩制服丝袜av| 一区二区三区四区不卡视频| 久久精品视频免费| 精品久久人人做人人爰| 欧美日韩久久久| 色综合天天综合| 岛国一区二区三区| 国产一区欧美日韩| 九九热在线视频观看这里只有精品| 亚洲自拍偷拍网站| 亚洲精品免费电影| www久久精品| 精品欧美一区二区三区精品久久| 欧美特级限制片免费在线观看| av一本久道久久综合久久鬼色| 国产毛片精品视频| 精品一区二区三区不卡| 美国毛片一区二区| 男人的j进女人的j一区| 日韩av成人高清| 日本va欧美va瓶| 日韩av中文字幕一区二区 | 亚洲欧美在线视频| 国产精品视频一二三| 中文字幕巨乱亚洲| 亚洲国产高清不卡| 国产调教视频一区| 国产精品美女久久久久久久久 | 欧美成人免费网站| 日韩精品一区在线| 欧美成人伊人久久综合网| 日韩欧美国产一区二区三区| 日韩一级精品视频在线观看| 在线播放国产精品二区一二区四区 | 丁香亚洲综合激情啪啪综合| 成人午夜在线免费| 91丨九色丨黑人外教| 91精品福利在线| 欧美精品高清视频| 日韩精品一区二区三区在线观看| 精品久久五月天| 中文文精品字幕一区二区| 最好看的中文字幕久久| 性久久久久久久| 亚洲三级免费电影| 1000部国产精品成人观看| 国产精品福利一区二区| 亚洲男帅同性gay1069| 亚洲一区二区三区在线看| 图片区小说区国产精品视频| 蜜桃视频免费观看一区| 国产成人一区二区精品非洲| 99久久免费精品| 欧美午夜电影一区| 久久综合狠狠综合| 国产喂奶挤奶一区二区三区| 综合久久给合久久狠狠狠97色| 亚洲激情欧美激情| 麻豆免费精品视频| 成人av动漫在线| 欧美丰满少妇xxxbbb| 国产农村妇女精品| 一区二区三区**美女毛片| 久久er精品视频| 91蝌蚪porny九色| 日韩欧美成人一区二区| 综合婷婷亚洲小说| 激情小说欧美图片| 在线精品观看国产| 国产亚洲精久久久久久| 亚洲r级在线视频| 丁香天五香天堂综合| 欧美美女喷水视频| 中文字幕 久热精品 视频在线 | 欧美电影免费观看高清完整版在线| 久久这里只有精品首页| 亚洲综合在线免费观看| 久久99国内精品| 在线观看免费亚洲| 久久久www成人免费毛片麻豆| 亚洲午夜日本在线观看| 国产成人欧美日韩在线电影| 666欧美在线视频| 国产精品黄色在线观看| 久久国产欧美日韩精品| 在线一区二区三区四区| 欧美激情一区二区三区| 久久国产日韩欧美精品| 精品1区2区3区| 日韩毛片精品高清免费| 国产伦精品一区二区三区免费 | 欧美片在线播放| 亚洲欧洲成人自拍| 国产美女精品人人做人人爽| 日韩一区二区在线观看视频| 亚洲午夜电影网| 91免费在线看| 亚洲欧美在线高清| 粉嫩av一区二区三区粉嫩| 欧美精品一区二区不卡 | 激情文学综合网| 欧美一区二区三区视频免费播放 | 国产三区在线成人av| 男人的天堂亚洲一区| 欧美三级日韩在线| 亚洲精品中文在线观看| 99久久久精品| 自拍av一区二区三区| av电影天堂一区二区在线观看| 久久久久久日产精品| 激情五月激情综合网| 精品电影一区二区三区 | 亚洲欧洲色图综合| 丁香婷婷深情五月亚洲| 欧美—级在线免费片| 国产成人免费在线| 国产欧美日本一区二区三区| 国产高清亚洲一区| 国产精品嫩草影院com| av欧美精品.com| 亚洲乱码国产乱码精品精的特点| 99国产精品久久久| 亚洲激情中文1区| 欧美日韩1区2区| 奇米综合一区二区三区精品视频 | 国产成人一区在线| 国产精品视频在线看| 色综合咪咪久久| 亚洲一区在线观看免费| 欧美三级午夜理伦三级中视频| 亚洲午夜久久久| 欧美精品一二三四| 激情深爱一区二区| 中文字幕精品综合| 欧美视频在线一区二区三区| 婷婷夜色潮精品综合在线| 日韩欧美国产综合在线一区二区三区| 蜜臀av一级做a爰片久久| 国产亚洲综合在线| 96av麻豆蜜桃一区二区| 亚洲综合精品久久| 欧美成人午夜电影| 成人av在线影院| 亚洲大片精品永久免费| 日韩欧美一区电影| 成人av在线电影| 视频一区二区中文字幕| 久久久久国产免费免费| 91美女在线视频| 久久精品国产免费| 亚洲视频狠狠干| 日韩免费高清视频|