summaryrefslogtreecommitdiffstats
path: root/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-nand-markbad-reallybad.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-nand-markbad-reallybad.patch')
-rw-r--r--meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-nand-markbad-reallybad.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-nand-markbad-reallybad.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-nand-markbad-reallybad.patch
new file mode 100644
index 0000000000..d630889e3c
--- /dev/null
+++ b/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-nand-markbad-reallybad.patch
@@ -0,0 +1,20 @@
1This patch makes sure that the 'nand markbad' command does not only mark a block
2'bad' in the bad-block table, but _also_ marks it bad in the OOB area.
3
4we need this to preserve the bad block status when re-creating the bad block table
5at some later point.
6
7Signed-off-by: Harald Welte <laforge@openmoko.org>
8Index: u-boot/drivers/nand/nand_base.c
9===================================================================
10--- u-boot.orig/drivers/nand/nand_base.c 2007-03-01 12:47:31.000000000 +0100
11+++ u-boot/drivers/nand/nand_base.c 2007-03-01 12:48:08.000000000 +0100
12@@ -481,7 +481,7 @@
13
14 /* Do we have a flash based bad block table ? */
15 if (this->options & NAND_USE_FLASH_BBT)
16- return nand_update_bbt (mtd, ofs);
17+ nand_update_bbt (mtd, ofs);
18
19 /* We write two bytes, so we dont have to mess with 16 bit access */
20 ofs += mtd->oobsize + (this->badblockpos & ~0x01);