diff options
Diffstat (limited to 'meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-create-optional.patch')
-rw-r--r-- | meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-create-optional.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-create-optional.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-create-optional.patch new file mode 100644 index 0000000000..d7a2a872e5 --- /dev/null +++ b/meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-create-optional.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | This patch makes creation of the BBT optional for the s3c24x0 platform. | ||
2 | It adds: | ||
3 | |||
4 | - a new platform-independent NAND-wide flag NAND_DONT_CREATE_BBT | ||
5 | - one user of this flag, namely s3c24x0 | ||
6 | |||
7 | Experimental. | ||
8 | |||
9 | - Werner Almesberger <werner@openmoko.org> | ||
10 | |||
11 | |||
12 | Index: u-boot/cpu/arm920t/s3c24x0/nand.c | ||
13 | =================================================================== | ||
14 | --- u-boot.orig/cpu/arm920t/s3c24x0/nand.c 2007-02-16 23:53:29.000000000 +0100 | ||
15 | +++ u-boot/cpu/arm920t/s3c24x0/nand.c 2007-02-16 23:53:54.000000000 +0100 | ||
16 | @@ -169,7 +169,7 @@ | ||
17 | |||
18 | nand->eccmode = NAND_ECC_SOFT; | ||
19 | #ifdef CONFIG_S3C2410_NAND_BBT | ||
20 | - nand->options = NAND_USE_FLASH_BBT; | ||
21 | + nand->options = NAND_USE_FLASH_BBT | NAND_DONT_CREATE_BBT; | ||
22 | #else | ||
23 | nand->options = 0; | ||
24 | #endif | ||
25 | Index: u-boot/drivers/nand/nand_bbt.c | ||
26 | =================================================================== | ||
27 | --- u-boot.orig/drivers/nand/nand_bbt.c 2007-02-16 23:53:36.000000000 +0100 | ||
28 | +++ u-boot/drivers/nand/nand_bbt.c 2007-02-16 23:53:54.000000000 +0100 | ||
29 | @@ -678,7 +678,8 @@ | ||
30 | } | ||
31 | create: | ||
32 | /* Create the bad block table by scanning the device ? */ | ||
33 | - if (!(td->options & NAND_BBT_CREATE)) | ||
34 | + if (!(td->options & NAND_BBT_CREATE) || | ||
35 | + (this->options & NAND_DONT_CREATE_BBT)) | ||
36 | continue; | ||
37 | |||
38 | /* Create the table in memory by scanning the chip(s) */ | ||
39 | Index: u-boot/include/linux/mtd/nand.h | ||
40 | =================================================================== | ||
41 | --- u-boot.orig/include/linux/mtd/nand.h 2007-02-16 23:53:08.000000000 +0100 | ||
42 | +++ u-boot/include/linux/mtd/nand.h 2007-02-16 23:53:54.000000000 +0100 | ||
43 | @@ -187,7 +187,8 @@ | ||
44 | * This can only work if we have the ecc bytes directly behind the | ||
45 | * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */ | ||
46 | #define NAND_HWECC_SYNDROME 0x00020000 | ||
47 | - | ||
48 | +/* Do not create an BBT if none is found. Overrides NAND_BBT_CREATE. */ | ||
49 | +#define NAND_DONT_CREATE_BBT 0x00040000 | ||
50 | |||
51 | /* Options set by nand scan */ | ||
52 | /* Nand scan has allocated oob_buf */ | ||