diff options
author | Brian Norris <norris@broadcom.com> | 2010-06-23 16:36:02 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-08-02 04:05:12 -0400 |
commit | 30fe8115b55223cb84530ce04c4a20ba9d6dcf0b (patch) | |
tree | a589cb88978bcf39808e800fd79c663218377bf9 /drivers/mtd/nand/nand_base.c | |
parent | e1d0fe3cddf2306e3ac32569aa152f1909c9b46e (diff) |
mtd: nand: edit macro flag for BBT scan of last page in block
NAND_BB_LAST_PAGE used to be in nand.h, but it pertained to bad block
management and so belongs next to NAND_BBT_SCAN2NDPAGE in bbm.h. Also,
its previous flag value (0x00000400) conflicted with NAND_BBT_SCANALLPAGES
so I changed its value to 0x00008000. All uses of the name were modified to
provide consistency with other "NAND_BBT_*" flags.
Signed-off-by: Brian Norris <norris@broadcom.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 6 |
1 files changed, 3 insertions, 3 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) |