diff options
Diffstat (limited to 'drivers/mtd/nand/docg4.c')
-rw-r--r-- | drivers/mtd/nand/docg4.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c index dc86d4a3c3dd..548db2389fab 100644 --- a/drivers/mtd/nand/docg4.c +++ b/drivers/mtd/nand/docg4.c | |||
@@ -1093,7 +1093,6 @@ static int docg4_block_markbad(struct mtd_info *mtd, loff_t ofs) | |||
1093 | struct nand_chip *nand = mtd->priv; | 1093 | struct nand_chip *nand = mtd->priv; |
1094 | struct docg4_priv *doc = nand->priv; | 1094 | struct docg4_priv *doc = nand->priv; |
1095 | struct nand_bbt_descr *bbtd = nand->badblock_pattern; | 1095 | struct nand_bbt_descr *bbtd = nand->badblock_pattern; |
1096 | int block = (int)(ofs >> nand->bbt_erase_shift); | ||
1097 | int page = (int)(ofs >> nand->page_shift); | 1096 | int page = (int)(ofs >> nand->page_shift); |
1098 | uint32_t g4_addr = mtd_to_docg4_address(page, 0); | 1097 | uint32_t g4_addr = mtd_to_docg4_address(page, 0); |
1099 | 1098 | ||
@@ -1108,9 +1107,6 @@ static int docg4_block_markbad(struct mtd_info *mtd, loff_t ofs) | |||
1108 | if (buf == NULL) | 1107 | if (buf == NULL) |
1109 | return -ENOMEM; | 1108 | return -ENOMEM; |
1110 | 1109 | ||
1111 | /* update bbt in memory */ | ||
1112 | nand->bbt[block / 4] |= 0x01 << ((block & 0x03) * 2); | ||
1113 | |||
1114 | /* write bit-wise negation of pattern to oob buffer */ | 1110 | /* write bit-wise negation of pattern to oob buffer */ |
1115 | memset(nand->oob_poi, 0xff, mtd->oobsize); | 1111 | memset(nand->oob_poi, 0xff, mtd->oobsize); |
1116 | for (i = 0; i < bbtd->len; i++) | 1112 | for (i = 0; i < bbtd->len; i++) |
@@ -1120,8 +1116,6 @@ static int docg4_block_markbad(struct mtd_info *mtd, loff_t ofs) | |||
1120 | write_page_prologue(mtd, g4_addr); | 1116 | write_page_prologue(mtd, g4_addr); |
1121 | docg4_write_page(mtd, nand, buf, 1); | 1117 | docg4_write_page(mtd, nand, buf, 1); |
1122 | ret = pageprog(mtd); | 1118 | ret = pageprog(mtd); |
1123 | if (!ret) | ||
1124 | mtd->ecc_stats.badblocks++; | ||
1125 | 1119 | ||
1126 | kfree(buf); | 1120 | kfree(buf); |
1127 | 1121 | ||