aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_bbt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/nand_bbt.c')
-rw-r--r--drivers/mtd/nand/nand_bbt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 480c3cbf9bf9..a612c4ea8194 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -176,6 +176,7 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num,
176 printk(KERN_DEBUG "nand_read_bbt: Reserved block at 0x%08x\n", 176 printk(KERN_DEBUG "nand_read_bbt: Reserved block at 0x%08x\n",
177 ((offs << 2) + (act >> 1)) << this->bbt_erase_shift); 177 ((offs << 2) + (act >> 1)) << this->bbt_erase_shift);
178 this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06); 178 this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06);
179 mtd->ecc_stats.bbtblocks++;
179 continue; 180 continue;
180 } 181 }
181 /* Leave it for now, if its matured we can move this 182 /* Leave it for now, if its matured we can move this
@@ -187,6 +188,7 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num,
187 this->bbt[offs + (act >> 3)] |= 0x3 << (act & 0x06); 188 this->bbt[offs + (act >> 3)] |= 0x3 << (act & 0x06);
188 else 189 else
189 this->bbt[offs + (act >> 3)] |= 0x1 << (act & 0x06); 190 this->bbt[offs + (act >> 3)] |= 0x1 << (act & 0x06);
191 mtd->ecc_stats.badblocks++;
190 } 192 }
191 } 193 }
192 totlen -= len; 194 totlen -= len;
@@ -431,6 +433,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf,
431 this->bbt[i >> 3] |= 0x03 << (i & 0x6); 433 this->bbt[i >> 3] |= 0x03 << (i & 0x6);
432 printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n", 434 printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n",
433 i >> 1, (unsigned int)from); 435 i >> 1, (unsigned int)from);
436 mtd->ecc_stats.badblocks++;
434 } 437 }
435 438
436 i += 2; 439 i += 2;