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

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

?? mtd.patch

?? patches for linux-2.6.
?? PATCH
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
 		 		/* Latency issues. Drop the lock, wait a while and retry */-		spin_unlock(chip->mutex); 		UDELAY(map, chip, adr, 1000000/HZ);-		spin_lock(chip->mutex); 	}  	/* We've broken this before. It doesn't hurt to be safe */@@ -1778,53 +1793,40 @@ 	chip->state = FL_STATUS; 	status = map_read(map, adr); -	/* check for lock bit */+	/* check for errors */ 	if (map_word_bitsset(map, status, CMD(0x3a))) {-		unsigned char chipstatus;+		unsigned long chipstatus = MERGESTATUS(status);  		/* Reset the error bits */ 		map_write(map, CMD(0x50), adr); 		map_write(map, CMD(0x70), adr); 		xip_enable(map, chip, adr); -		chipstatus = status.x[0];-		if (!map_word_equal(map, status, CMD(chipstatus))) {-			int i, w;-			for (w=0; w<map_words(map); w++) {-				for (i = 0; i<cfi_interleave(cfi); i++) {-					chipstatus |= status.x[w] >> (cfi->device_type * 8);-				}-			}-			printk(KERN_WARNING "Status is not identical for all chips: 0x%lx. Merging to give 0x%02x\n",-			       status.x[0], chipstatus);-		}- 		if ((chipstatus & 0x30) == 0x30) {-			printk(KERN_NOTICE "Chip reports improper command sequence: status 0x%x\n", chipstatus);-			ret = -EIO;+			printk(KERN_ERR "%s: block erase error: (bad command sequence, status 0x%lx)\n", map->name, chipstatus);+			ret = -EINVAL; 		} else if (chipstatus & 0x02) { 			/* Protection bit set */ 			ret = -EROFS; 		} else if (chipstatus & 0x8) { 			/* Voltage */-			printk(KERN_WARNING "Chip reports voltage low on erase: status 0x%x\n", chipstatus);+			printk(KERN_ERR "%s: block erase error: (bad VPP)\n", map->name); 			ret = -EIO;-		} else if (chipstatus & 0x20) {-			if (retries--) {-				printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%x. Retrying...\n", adr, chipstatus);-				timeo = jiffies + HZ;-				put_chip(map, chip, adr);-				spin_unlock(chip->mutex);-				goto retry;-			}-			printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%x\n", adr, chipstatus);+		} else if (chipstatus & 0x20 && retries--) {+			printk(KERN_DEBUG "block erase failed at 0x%08lx: status 0x%lx. Retrying...\n", adr, chipstatus);+			timeo = jiffies + HZ;+			put_chip(map, chip, adr);+			spin_unlock(chip->mutex);+			goto retry;+		} else {+			printk(KERN_ERR "%s: block erase failed at 0x%08lx (status 0x%lx)\n", map->name, adr, chipstatus); 			ret = -EIO; 		}-	} else {-		xip_enable(map, chip, adr);-		ret = 0;++		goto out; 	} +	xip_enable(map, chip, adr);  out:	put_chip(map, chip, adr); 	spin_unlock(chip->mutex); 	return ret;@@ -1882,6 +1884,7 @@ 		 		if (chip->state == FL_SYNCING) { 			chip->state = chip->oldstate;+			chip->oldstate = FL_READY; 			wake_up(&chip->wq); 		} 		spin_unlock(chip->mutex);@@ -1897,8 +1900,9 @@ 	struct cfi_private *cfi = map->fldrv_priv; 	int status, ofs_factor = cfi->interleave * cfi->device_type; +	adr += chip->start; 	xip_disable(map, chip, adr+(2*ofs_factor));-	cfi_send_gen_cmd(0x90, 0x55, 0, map, cfi, cfi->device_type, NULL);+	map_write(map, CMD(0x90), adr+(2*ofs_factor)); 	chip->state = FL_JEDEC_QUERY; 	status = cfi_read_query(map, adr+(2*ofs_factor)); 	xip_enable(map, chip, 0);@@ -1915,6 +1919,7 @@ 				       unsigned long adr, int len, void *thunk) { 	struct cfi_private *cfi = map->fldrv_priv;+	struct cfi_pri_intelext *extp = cfi->cmdset_priv; 	map_word status, status_OK; 	unsigned long timeo = jiffies + HZ; 	int ret;@@ -1944,9 +1949,13 @@ 	} else 		BUG(); -	spin_unlock(chip->mutex);-	UDELAY(map, chip, adr, 1000000/HZ);-	spin_lock(chip->mutex);+	/*+	 * If Instant Individual Block Locking supported then no need+	 * to delay.+	 */++	if (!extp || !(extp->FeatureSupport & (1 << 5)))+		UDELAY(map, chip, adr, 1000000/HZ);  	/* FIXME. Use a timer to check this, and return immediately. */ 	/* Once the state machine's known to be working I'll do that */@@ -1960,22 +1969,17 @@ 		 		/* OK Still waiting */ 		if (time_after(jiffies, timeo)) {-			map_word Xstatus; 			map_write(map, CMD(0x70), adr); 			chip->state = FL_STATUS;-			Xstatus = map_read(map, adr); 			xip_enable(map, chip, adr);-			printk(KERN_ERR "waiting for unlock to complete timed out. status = %lx, Xstatus = %lx.\n",-			       status.x[0], Xstatus.x[0]);+			printk(KERN_ERR "%s: block unlock error: (status timeout)\n", map->name); 			put_chip(map, chip, adr); 			spin_unlock(chip->mutex); 			return -EIO; 		} 		 		/* Latency issues. Drop the lock, wait a while and retry */-		spin_unlock(chip->mutex); 		UDELAY(map, chip, adr, 1);-		spin_lock(chip->mutex); 	} 	 	/* Done and happy. */@@ -2034,6 +2038,274 @@ 	return ret; } +#ifdef CONFIG_MTD_OTP++typedef int (*otp_op_t)(struct map_info *map, struct flchip *chip, +			u_long data_offset, u_char *buf, u_int size,+			u_long prot_offset, u_int groupno, u_int groupsize);++static int __xipram+do_otp_read(struct map_info *map, struct flchip *chip, u_long offset,+	    u_char *buf, u_int size, u_long prot, u_int grpno, u_int grpsz)+{+	struct cfi_private *cfi = map->fldrv_priv;+	int ret;++	spin_lock(chip->mutex);+	ret = get_chip(map, chip, chip->start, FL_JEDEC_QUERY);+	if (ret) {+		spin_unlock(chip->mutex);+		return ret;+	}++	/* let's ensure we're not reading back cached data from array mode */+	INVALIDATE_CACHED_RANGE(map, chip->start + offset, size);++	xip_disable(map, chip, chip->start);+	if (chip->state != FL_JEDEC_QUERY) {+		map_write(map, CMD(0x90), chip->start);+		chip->state = FL_JEDEC_QUERY;+	}+	map_copy_from(map, buf, chip->start + offset, size);+	xip_enable(map, chip, chip->start);++	/* then ensure we don't keep OTP data in the cache */+	INVALIDATE_CACHED_RANGE(map, chip->start + offset, size);++	put_chip(map, chip, chip->start);+	spin_unlock(chip->mutex);+	return 0;+}++static int+do_otp_write(struct map_info *map, struct flchip *chip, u_long offset,+	     u_char *buf, u_int size, u_long prot, u_int grpno, u_int grpsz)+{+	int ret;++	while (size) {+		unsigned long bus_ofs = offset & ~(map_bankwidth(map)-1);+		int gap = offset - bus_ofs;+		int n = min_t(int, size, map_bankwidth(map)-gap);+		map_word datum = map_word_ff(map);++		datum = map_word_load_partial(map, datum, buf, gap, n);+		ret = do_write_oneword(map, chip, bus_ofs, datum, FL_OTP_WRITE);+		if (ret) +			return ret;++		offset += n;+		buf += n;+		size -= n;+	}++	return 0;+}++static int+do_otp_lock(struct map_info *map, struct flchip *chip, u_long offset,+	    u_char *buf, u_int size, u_long prot, u_int grpno, u_int grpsz)+{+	struct cfi_private *cfi = map->fldrv_priv;+	map_word datum;++	/* make sure area matches group boundaries */+	if (size != grpsz)+		return -EXDEV;++	datum = map_word_ff(map);+	datum = map_word_clr(map, datum, CMD(1 << grpno));+	return do_write_oneword(map, chip, prot, datum, FL_OTP_WRITE);+}++static int cfi_intelext_otp_walk(struct mtd_info *mtd, loff_t from, size_t len,+				 size_t *retlen, u_char *buf,+				 otp_op_t action, int user_regs)+{+	struct map_info *map = mtd->priv;+	struct cfi_private *cfi = map->fldrv_priv;+	struct cfi_pri_intelext *extp = cfi->cmdset_priv;+	struct flchip *chip;+	struct cfi_intelext_otpinfo *otp;+	u_long devsize, reg_prot_offset, data_offset;+	u_int chip_num, chip_step, field, reg_fact_size, reg_user_size;+	u_int groups, groupno, groupsize, reg_fact_groups, reg_user_groups;+	int ret;++	*retlen = 0;++	/* Check that we actually have some OTP registers */+	if (!extp || !(extp->FeatureSupport & 64) || !extp->NumProtectionFields)+		return -ENODATA;++	/* we need real chips here not virtual ones */+	devsize = (1 << cfi->cfiq->DevSize) * cfi->interleave;+	chip_step = devsize >> cfi->chipshift;+	chip_num = 0;++	/* Some chips have OTP located in the _top_ partition only.+	   For example: Intel 28F256L18T (T means top-parameter device) */+	if (cfi->mfr == MANUFACTURER_INTEL) {+		switch (cfi->id) {+		case 0x880b:+		case 0x880c:+		case 0x880d:+			chip_num = chip_step - 1;+		}+	}++	for ( ; chip_num < cfi->numchips; chip_num += chip_step) {+		chip = &cfi->chips[chip_num];+		otp = (struct cfi_intelext_otpinfo *)&extp->extra[0];++		/* first OTP region */+		field = 0;+		reg_prot_offset = extp->ProtRegAddr;+		reg_fact_groups = 1;+		reg_fact_size = 1 << extp->FactProtRegSize;+		reg_user_groups = 1;+		reg_user_size = 1 << extp->UserProtRegSize;++		while (len > 0) {+			/* flash geometry fixup */+			data_offset = reg_prot_offset + 1;+			data_offset *= cfi->interleave * cfi->device_type;+			reg_prot_offset *= cfi->interleave * cfi->device_type;+			reg_fact_size *= cfi->interleave;+			reg_user_size *= cfi->interleave;++			if (user_regs) {+				groups = reg_user_groups;+				groupsize = reg_user_size;+				/* skip over factory reg area */+				groupno = reg_fact_groups;+				data_offset += reg_fact_groups * reg_fact_size;+			} else {+				groups = reg_fact_groups;+				groupsize = reg_fact_size;+				groupno = 0;+			}++			while (len > 0 && groups > 0) {+				if (!action) {+					/*+					 * Special case: if action is NULL+					 * we fill buf with otp_info records.+					 */+					struct otp_info *otpinfo;+					map_word lockword;+					len -= sizeof(struct otp_info);+					if (len <= 0)+						return -ENOSPC;+					ret = do_otp_read(map, chip,+							  reg_prot_offset,+							  (u_char *)&lockword,+							  map_bankwidth(map),+							  0, 0,  0);+					if (ret)+						return ret;+					otpinfo = (struct otp_info *)buf;+					otpinfo->start = from;+					otpinfo->length = groupsize;+					otpinfo->locked =+					   !map_word_bitsset(map, lockword,+							     CMD(1 << groupno));+					from += groupsize;+					buf += sizeof(*otpinfo);+					*retlen += sizeof(*otpinfo);+				} else if (from >= groupsize) {+					from -= groupsize;+					data_offset += groupsize;+				} else {+					int size = groupsize;+					data_offset += from;+					size -= from;+					from = 0;+					if (size > len)+						size = len;+					ret = action(map, chip, data_offset,+						     buf, size, reg_prot_offset,+						     groupno, groupsize);+					if (ret < 0)+						return ret;+					buf += size;+					len -= size;+					*retlen += size;+					data_offset += size;+				}+				groupno++;+				groups--;+			}++			/* next OTP region */+			if (++field == extp->NumProtectionFields)+				break;+			reg_prot_offset = otp->ProtRegAddr;+			reg_fact_groups = otp->FactGroups;+			reg_fact_size = 1 << otp->FactProtRegSize;+			reg_user_groups = otp->UserGroups;+			reg_user_size = 1 << otp->UserProtRegSize;+			otp++;+		}+	}++	return 0;+}++static int cfi_intelext_read_fact_prot_reg(struct mtd_info *mtd, loff_t from,+					   size_t len, size_t *retlen,+					    u_char *buf)+{+	return cfi_intelext_otp_walk(mtd, from, len, retlen,+				     buf, do_otp_read, 0);+}++static int cfi_intelext_read_user_prot_reg(struct mtd_info *mtd, loff_t from,+					   size_t len, size_t *retlen,+					    u_char *buf)+{+	return cfi_intelext_otp_walk(mtd, from, len, retlen,+				     buf, do_otp_read, 1);+}++static int cfi_intelext_write_user_prot_reg(struct mtd_info *mtd, loff_t from,+					    size_t len, size_t *retlen,+					     u_char *buf)+{+	return cfi_intelext_otp_walk(mtd, from, len, retlen,+				     buf, do_otp_write, 1);+}++static int cfi_intelext_lock_user_prot_reg(struct mtd_info *mtd,+					   loff_t from, size_t len)+{+	size_t retlen;+	return cfi_intelext_otp_walk(mtd, from, len, &retlen,+				     NULL, do_otp_lock, 1);+}++static int cfi_intelext_get_fact_prot_info(struct mtd_info *mtd, +					   struct otp_info *buf, size_t len)+{+	size_t retlen;+	int ret;++	ret = cfi_intelext_otp_walk(mtd, 0, len, &retlen, (u_char *)buf, NULL, 0);+	return ret ? : retlen;+}++static int cfi_intelext_get_user_prot_info(struct mtd_info *mtd,+					   struct otp_info *buf, size_t len)+{+	size_t retlen;+	int ret;++	ret = cfi_intelext_otp_walk(mtd, 0, len, &retlen, (u_char *)buf, NULL, 1);+	return ret ? : retlen;+}++#endif+

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三级| 五月激情综合色| 国产精品无码永久免费888| 精品少妇一区二区三区免费观看 | 亚洲美女免费在线| 成人免费在线观看入口| 国产精品高潮久久久久无| 中文字幕日韩精品一区| 亚洲欧美一区二区在线观看| 国产精品国产三级国产普通话99| 国产精品色一区二区三区| 国产精品素人一区二区| 国产精品高潮呻吟| 亚洲欧美偷拍卡通变态| 亚洲国产裸拍裸体视频在线观看乱了 | 7777精品伊人久久久大香线蕉完整版 | 色综合天天性综合| 色哟哟精品一区| 欧美日韩在线综合| 日韩欧美久久一区| 国产香蕉久久精品综合网| 欧美极品xxx| 一区二区三区四区中文字幕| 亚洲综合色婷婷| 日本伊人色综合网| 国产毛片精品一区| 91一区二区在线观看| 欧美日韩高清影院| 欧美成人a在线| 欧美国产激情二区三区 | 寂寞少妇一区二区三区| 成人午夜视频在线观看| 在线亚洲+欧美+日本专区| 欧美日韩国产小视频| 久久久久久久久99精品| 亚洲婷婷在线视频| 日韩综合一区二区| 国产成人亚洲精品青草天美| 色八戒一区二区三区| 日韩一区二区精品在线观看| 国产日韩欧美不卡| 午夜国产精品一区| 国产v综合v亚洲欧| 欧美无乱码久久久免费午夜一区 | 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 欧美电影免费观看高清完整版在线观看| 亚洲精品一区二区三区福利| 国产精品成人网| 五月天亚洲婷婷| 懂色av一区二区夜夜嗨| 欧美视频日韩视频| 国产日韩欧美综合一区| 亚洲综合成人在线视频| 亚洲成a天堂v人片| 人禽交欧美网站| 99视频在线观看一区三区| 欧美日本免费一区二区三区| 国产偷v国产偷v亚洲高清| 一区二区三区在线免费观看| 激情av综合网| 欧美日韩国产小视频在线观看| 国产区在线观看成人精品| 亚洲成人激情自拍| av不卡在线播放| 久久蜜桃av一区精品变态类天堂| 亚洲激情图片一区| 国产成人三级在线观看| 在线电影院国产精品| 亚洲色图视频免费播放| 国产一区二区免费看| 777久久久精品| 亚洲影院理伦片| www.激情成人| 久久久九九九九| 六月婷婷色综合| 精品视频1区2区| 玉米视频成人免费看| 丰满放荡岳乱妇91ww| 欧美va亚洲va| 奇米精品一区二区三区四区| 欧美性猛交xxxx乱大交退制版| 国产精品美女www爽爽爽| 狠狠色丁香婷综合久久| 欧美一二三区在线观看| 天天色综合天天| 欧美吞精做爰啪啪高潮| 亚洲欧美日韩中文字幕一区二区三区| 国产精品亚洲一区二区三区在线| 欧美一区二区三区免费在线看| 亚洲一区二区三区爽爽爽爽爽| 成人免费视频app| 国产婷婷一区二区| 国产精品一区三区| 久久尤物电影视频在线观看| 久久超碰97人人做人人爱| 日韩一区二区三免费高清| 日韩和欧美一区二区| 欧美日韩国产色站一区二区三区| 亚洲在线一区二区三区| 91久久精品一区二区| 亚洲精品大片www| 91老师国产黑色丝袜在线| 亚洲青青青在线视频| 一本久久a久久免费精品不卡| 国产精品成人免费在线| 91无套直看片红桃| 亚洲美女免费在线| 欧美三级韩国三级日本三斤| 亚洲国产视频一区二区| 欧美日韩的一区二区| 日日夜夜免费精品| 欧美一级精品在线| 激情文学综合丁香| 久久精品亚洲国产奇米99| 高清在线成人网| 亚洲免费资源在线播放| 欧美在线播放高清精品| 亚洲成人动漫一区| 日韩欧美视频在线| 高清日韩电视剧大全免费| 亚洲欧洲美洲综合色网| 欧美中文字幕久久| 免费成人在线观看视频| 久久一留热品黄| av电影在线不卡| 午夜精品在线看| 欧美成人性战久久| av在线这里只有精品| 亚洲自拍偷拍av| 日韩欧美一级片| 国产成a人亚洲精| 亚洲综合色丁香婷婷六月图片| 51精品久久久久久久蜜臀| 精品一区二区三区日韩| 国产精品视频线看| 欧美午夜电影一区| 激情综合亚洲精品| 亚洲乱码国产乱码精品精98午夜 | 色哟哟欧美精品| 青草av.久久免费一区| 国产亚洲一二三区| 日本韩国一区二区| 蜜臀久久久99精品久久久久久| 国产精品三级在线观看| 欧美日韩一本到| 国产毛片一区二区| 亚洲狠狠爱一区二区三区| 26uuu国产日韩综合| 一本色道久久综合亚洲91| 美女www一区二区| 91精品国产91久久久久久最新毛片 | 久久亚洲捆绑美女| 日本道色综合久久| 久久国产三级精品| 亚洲人成网站在线| 精品国产乱码久久久久久久| 97精品久久久久中文字幕| 另类成人小视频在线| 亚洲卡通动漫在线| 精品粉嫩超白一线天av| 91久久精品午夜一区二区| 国产尤物一区二区在线| 亚洲综合自拍偷拍| 中文字幕av资源一区| 5月丁香婷婷综合| 成人午夜免费视频| 蜜桃视频在线一区| 亚洲图片一区二区| 国产精品久久久久久亚洲毛片 | 久久久久国产免费免费| 欧美日本韩国一区二区三区视频 | 欧美一级午夜免费电影| k8久久久一区二区三区| 精品一区二区三区免费| 一区二区三区欧美视频| 国产精品视频一二三| 亚洲精品在线一区二区| 7799精品视频| 欧美日韩一区二区欧美激情| 成人免费av资源| 国产在线不卡视频| 天天色天天爱天天射综合| 一区二区三区在线播放| 国产精品伦一区| 久久久99精品免费观看不卡| 777奇米成人网| 欧美喷潮久久久xxxxx| 色婷婷一区二区三区四区| av午夜精品一区二区三区| 国产乱色国产精品免费视频| 奇米精品一区二区三区在线观看一 | 亚洲一区二区三区四区不卡| 亚洲视频你懂的| 自拍偷拍欧美精品| 国产精品色呦呦| 国产精品久久久久aaaa樱花| 中文字幕 久热精品 视频在线 | 亚洲福利一区二区三区| 亚洲另类中文字| 亚洲精品成a人|