summaryrefslogtreecommitdiff
path: root/packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch
blob: d630889e3c9059f742d752e795c90788d6c6d414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
This patch makes sure that the 'nand markbad' command does not only mark a block
'bad' in the bad-block table, but _also_ marks it bad in the OOB area.

we need this to preserve the bad block status when re-creating the bad block table
at some later point.

Signed-off-by: Harald Welte <laforge@openmoko.org>
Index: u-boot/drivers/nand/nand_base.c
===================================================================
--- u-boot.orig/drivers/nand/nand_base.c	2007-03-01 12:47:31.000000000 +0100
+++ u-boot/drivers/nand/nand_base.c	2007-03-01 12:48:08.000000000 +0100
@@ -481,7 +481,7 @@
 
 	/* Do we have a flash based bad block table ? */
 	if (this->options & NAND_USE_FLASH_BBT)
-		return nand_update_bbt (mtd, ofs);
+		nand_update_bbt (mtd, ofs);
 
 	/* We write two bytes, so we dont have to mess with 16 bit access */
 	ofs += mtd->oobsize + (this->badblockpos & ~0x01);