nand-badisbad.patch

来自「Uboot常用的移植patches, 方便定制移植到s3c2440」· PATCH 代码 · 共 31 行

PATCH
31
字号
This patch makes nand_block_checkbad check both the BBT and the actualOOB data. This avoids accidently passing blocks as good when BBT andOOB markers are not synchronized, e.g., before "nand createbbt".Experimental.- Werner Almesberger <werner@openmoko.org>Index: u-boot/drivers/mtd/nand/nand_base.c===================================================================--- u-boot.orig/drivers/mtd/nand/nand_base.c+++ u-boot/drivers/mtd/nand/nand_base.c@@ -517,11 +517,14 @@ static int nand_block_checkbad (struct m { 	struct nand_chip *this = mtd->priv; -	if (!this->bbt)-		return this->block_bad(mtd, ofs, getchip);+	if (this->block_bad(mtd, ofs, getchip))+		return 1;  	/* Return info from the table */-	return nand_isbad_bbt (mtd, ofs, allowbbt);+	if (this->bbt && nand_isbad_bbt (mtd, ofs, allowbbt))+		return 1;++	return 0; }  /**

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?