summaryrefslogtreecommitdiffstats
path: root/meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2007-10-29 11:00:19 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2007-10-29 11:00:19 +0000
commit70abc059ebae6bd18399c0361d348f415a3f631a (patch)
tree86ae8bf44d64d40603b5bca6774eac7f1aaa3ce5 /meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch
parentce1e498f5d3a46642b6bb14c14ebae2a52f732a4 (diff)
downloadpoky-70abc059ebae6bd18399c0361d348f415a3f631a.tar.gz
u-boot: import OpenMoko uboot from OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3014 311d38ba-8fff-0310-9ca6-ca027cbcb966
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.patch30
1 files changed, 30 insertions, 0 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
new file mode 100644
index 0000000000..a5800e2499
--- /dev/null
+++ b/meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch
@@ -0,0 +1,30 @@
1This patch makes nand_block_checkbad check both the BBT and the actual
2OOB data. This avoids accidently passing blocks as good when BBT and
3OOB markers are not synchronized, e.g., before "nand createbbt".
4
5Experimental.
6
7- Werner Almesberger <werner@openmoko.org>
8
9Index: 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 /**