diff options
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 6 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_bbt.c | 2 | ||||
-rw-r--r-- | include/linux/mtd/bbm.h | 2 | ||||
-rw-r--r-- | include/linux/mtd/nand.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 4a7b86423ee9..e6cf9aefef13 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -347,7 +347,7 @@ static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) | |||
347 | struct nand_chip *chip = mtd->priv; | 347 | struct nand_chip *chip = mtd->priv; |
348 | u16 bad; | 348 | u16 bad; |
349 | 349 | ||
350 | if (chip->options & NAND_BB_LAST_PAGE) | 350 | if (chip->options & NAND_BBT_SCANLASTPAGE) |
351 | ofs += mtd->erasesize - mtd->writesize; | 351 | ofs += mtd->erasesize - mtd->writesize; |
352 | 352 | ||
353 | page = (int)(ofs >> chip->page_shift) & chip->pagemask; | 353 | page = (int)(ofs >> chip->page_shift) & chip->pagemask; |
@@ -399,7 +399,7 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) | |||
399 | uint8_t buf[2] = { 0, 0 }; | 399 | uint8_t buf[2] = { 0, 0 }; |
400 | int block, ret; | 400 | int block, ret; |
401 | 401 | ||
402 | if (chip->options & NAND_BB_LAST_PAGE) | 402 | if (chip->options & NAND_BBT_SCANLASTPAGE) |
403 | ofs += mtd->erasesize - mtd->writesize; | 403 | ofs += mtd->erasesize - mtd->writesize; |
404 | 404 | ||
405 | /* Get block number */ | 405 | /* Get block number */ |
@@ -2946,7 +2946,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, | |||
2946 | if ((chip->cellinfo & NAND_CI_CELLTYPE_MSK) && | 2946 | if ((chip->cellinfo & NAND_CI_CELLTYPE_MSK) && |
2947 | (*maf_id == NAND_MFR_SAMSUNG || | 2947 | (*maf_id == NAND_MFR_SAMSUNG || |
2948 | *maf_id == NAND_MFR_HYNIX)) | 2948 | *maf_id == NAND_MFR_HYNIX)) |
2949 | chip->options |= NAND_BB_LAST_PAGE; | 2949 | chip->options |= NAND_BBT_SCANLASTPAGE; |
2950 | 2950 | ||
2951 | /* Check for AND chips with 4 page planes */ | 2951 | /* Check for AND chips with 4 page planes */ |
2952 | if (chip->options & NAND_4PAGE_ARRAY) | 2952 | if (chip->options & NAND_4PAGE_ARRAY) |
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index ad97c0ce73b2..71d83be24ff6 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
@@ -432,7 +432,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, | |||
432 | from = (loff_t)startblock << (this->bbt_erase_shift - 1); | 432 | from = (loff_t)startblock << (this->bbt_erase_shift - 1); |
433 | } | 433 | } |
434 | 434 | ||
435 | if (this->options & NAND_BB_LAST_PAGE) | 435 | if (this->options & NAND_BBT_SCANLASTPAGE) |
436 | from += mtd->erasesize - (mtd->writesize * len); | 436 | from += mtd->erasesize - (mtd->writesize * len); |
437 | 437 | ||
438 | for (i = startblock; i < numblocks;) { | 438 | for (i = startblock; i < numblocks;) { |
diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h index 9c3757c5759d..8ad0b8629c3f 100644 --- a/include/linux/mtd/bbm.h +++ b/include/linux/mtd/bbm.h | |||
@@ -82,6 +82,8 @@ struct nand_bbt_descr { | |||
82 | #define NAND_BBT_SAVECONTENT 0x00002000 | 82 | #define NAND_BBT_SAVECONTENT 0x00002000 |
83 | /* Search good / bad pattern on the first and the second page */ | 83 | /* Search good / bad pattern on the first and the second page */ |
84 | #define NAND_BBT_SCAN2NDPAGE 0x00004000 | 84 | #define NAND_BBT_SCAN2NDPAGE 0x00004000 |
85 | /* Search good / bad pattern on the last page of the eraseblock */ | ||
86 | #define NAND_BBT_SCANLASTPAGE 0x00008000 | ||
85 | 87 | ||
86 | /* The maximum number of blocks to scan for a bbt */ | 88 | /* The maximum number of blocks to scan for a bbt */ |
87 | #define NAND_BBT_SCAN_MAXBLOCKS 4 | 89 | #define NAND_BBT_SCAN_MAXBLOCKS 4 |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index a81b185e23a7..50f3aa00a452 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -181,8 +181,6 @@ typedef enum { | |||
181 | #define NAND_NO_READRDY 0x00000100 | 181 | #define NAND_NO_READRDY 0x00000100 |
182 | /* Chip does not allow subpage writes */ | 182 | /* Chip does not allow subpage writes */ |
183 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 | 183 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 |
184 | /* Chip stores bad block marker on the last page of the eraseblock */ | ||
185 | #define NAND_BB_LAST_PAGE 0x00000400 | ||
186 | 184 | ||
187 | /* Device is one of 'new' xD cards that expose fake nand command set */ | 185 | /* Device is one of 'new' xD cards that expose fake nand command set */ |
188 | #define NAND_BROKEN_XD 0x00000400 | 186 | #define NAND_BROKEN_XD 0x00000400 |