diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-10-29 11:00:19 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-10-29 11:00:19 +0000 |
commit | 70abc059ebae6bd18399c0361d348f415a3f631a (patch) | |
tree | 86ae8bf44d64d40603b5bca6774eac7f1aaa3ce5 /meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch | |
parent | ce1e498f5d3a46642b6bb14c14ebae2a52f732a4 (diff) | |
download | openembedded-core-70abc059ebae6bd18399c0361d348f415a3f631a.tar.gz openembedded-core-70abc059ebae6bd18399c0361d348f415a3f631a.tar.bz2 openembedded-core-70abc059ebae6bd18399c0361d348f415a3f631a.tar.xz openembedded-core-70abc059ebae6bd18399c0361d348f415a3f631a.zip |
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.patch | 30 |
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 000000000..a5800e249 --- /dev/null +++ b/meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch @@ -0,0 +1,30 @@ +This patch makes nand_block_checkbad check both the BBT and the actual +OOB data. This avoids accidently passing blocks as good when BBT and +OOB markers are not synchronized, e.g., before "nand createbbt". + +Experimental. + +- Werner Almesberger <werner@openmoko.org> + +Index: u-boot/drivers/nand/nand_base.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_base.c ++++ u-boot/drivers/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; + } + + /** |