From 70abc059ebae6bd18399c0361d348f415a3f631a Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Mon, 29 Oct 2007 11:00:19 +0000 Subject: u-boot: import OpenMoko uboot from OE git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3014 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../nand-badisbad.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch (limited to 'meta/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch') 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 + +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; + } + + /** -- cgit v1.2.3