diff options
Diffstat (limited to 'meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch')
| -rw-r--r-- | meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch deleted file mode 100644 index a5800e2499..0000000000 --- a/meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | This patch makes nand_block_checkbad check both the BBT and the actual | ||
| 2 | OOB data. This avoids accidently passing blocks as good when BBT and | ||
| 3 | OOB markers are not synchronized, e.g., before "nand createbbt". | ||
| 4 | |||
| 5 | Experimental. | ||
| 6 | |||
| 7 | - Werner Almesberger <werner@openmoko.org> | ||
| 8 | |||
| 9 | Index: u-boot/drivers/nand/nand_base.c | ||
| 10 | =================================================================== | ||
| 11 | --- u-boot.orig/drivers/nand/nand_base.c | ||
| 12 | +++ u-boot/drivers/nand/nand_base.c | ||
| 13 | @@ -517,11 +517,14 @@ static int nand_block_checkbad (struct m | ||
| 14 | { | ||
| 15 | struct nand_chip *this = mtd->priv; | ||
| 16 | |||
| 17 | - if (!this->bbt) | ||
| 18 | - return this->block_bad(mtd, ofs, getchip); | ||
| 19 | + if (this->block_bad(mtd, ofs, getchip)) | ||
| 20 | + return 1; | ||
| 21 | |||
| 22 | /* Return info from the table */ | ||
| 23 | - return nand_isbad_bbt (mtd, ofs, allowbbt); | ||
| 24 | + if (this->bbt && nand_isbad_bbt (mtd, ofs, allowbbt)) | ||
| 25 | + return 1; | ||
| 26 | + | ||
| 27 | + return 0; | ||
| 28 | } | ||
| 29 | |||
| 30 | /** | ||
