⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbt-create-optional.patch

📁 Uboot常用的移植patches, 方便定制移植到s3c2440
💻 PATCH
字号:
This patch makes creation of the BBT optional for the s3c24x0 platform.It adds:- a new platform-independent NAND-wide flag NAND_DONT_CREATE_BBT- one user of this flag, namely s3c24x0Experimental.- Werner Almesberger <werner@openmoko.org>Index: u-boot/cpu/arm920t/s3c24x0/nand.c===================================================================--- u-boot.orig/cpu/arm920t/s3c24x0/nand.c+++ u-boot/cpu/arm920t/s3c24x0/nand.c@@ -209,7 +209,7 @@ #endif  #ifdef CONFIG_S3C2410_NAND_BBT-	nand->options = NAND_USE_FLASH_BBT;+	nand->options = NAND_USE_FLASH_BBT | NAND_DONT_CREATE_BBT; #else 	nand->options = 0; #endifIndex: u-boot/drivers/mtd/nand/nand_bbt.c===================================================================--- u-boot.orig/drivers/mtd/nand/nand_bbt.c+++ u-boot/drivers/nand/mtd/nand_bbt.c@@ -678,7 +678,8 @@ 		} create: 		/* Create the bad block table by scanning the device ? */-		if (!(td->options & NAND_BBT_CREATE))+		if (!(td->options & NAND_BBT_CREATE) ||+		  (this->options & NAND_DONT_CREATE_BBT)) 			continue;  		/* Create the table in memory by scanning the chip(s) */Index: u-boot/include/linux/mtd/nand.h===================================================================--- u-boot.orig/include/linux/mtd/nand.h+++ u-boot/include/linux/mtd/nand.h@@ -187,7 +187,8 @@  * This can only work if we have the ecc bytes directly behind the  * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */ #define NAND_HWECC_SYNDROME	0x00020000-+/* Do not create an BBT if none is found. Overrides NAND_BBT_CREATE. */+#define NAND_DONT_CREATE_BBT	0x00040000  /* Options set by nand scan */ /* Nand scan has allocated oob_buf */

⌨️ 快捷键说明

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