Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207755
b: refs/heads/master
c: 30fe811
h: refs/heads/master
i:
  207753: 6ebc6c2
  207751: a670b52
v: v3
  • Loading branch information
Brian Norris authored and David Woodhouse committed Aug 2, 2010
1 parent 8873281 commit 9ef7e02
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1d0fe3cddf2306e3ac32569aa152f1909c9b46e
refs/heads/master: 30fe8115b55223cb84530ce04c4a20ba9d6dcf0b
6 changes: 3 additions & 3 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
struct nand_chip *chip = mtd->priv;
u16 bad;

if (chip->options & NAND_BB_LAST_PAGE)
if (chip->options & NAND_BBT_SCANLASTPAGE)
ofs += mtd->erasesize - mtd->writesize;

page = (int)(ofs >> chip->page_shift) & chip->pagemask;
Expand Down Expand Up @@ -399,7 +399,7 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
uint8_t buf[2] = { 0, 0 };
int block, ret;

if (chip->options & NAND_BB_LAST_PAGE)
if (chip->options & NAND_BBT_SCANLASTPAGE)
ofs += mtd->erasesize - mtd->writesize;

/* Get block number */
Expand Down Expand Up @@ -2946,7 +2946,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
if ((chip->cellinfo & NAND_CI_CELLTYPE_MSK) &&
(*maf_id == NAND_MFR_SAMSUNG ||
*maf_id == NAND_MFR_HYNIX))
chip->options |= NAND_BB_LAST_PAGE;
chip->options |= NAND_BBT_SCANLASTPAGE;

/* Check for AND chips with 4 page planes */
if (chip->options & NAND_4PAGE_ARRAY)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/nand/nand_bbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf,
from = (loff_t)startblock << (this->bbt_erase_shift - 1);
}

if (this->options & NAND_BB_LAST_PAGE)
if (this->options & NAND_BBT_SCANLASTPAGE)
from += mtd->erasesize - (mtd->writesize * len);

for (i = startblock; i < numblocks;) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mtd/bbm.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ struct nand_bbt_descr {
#define NAND_BBT_SAVECONTENT 0x00002000
/* Search good / bad pattern on the first and the second page */
#define NAND_BBT_SCAN2NDPAGE 0x00004000
/* Search good / bad pattern on the last page of the eraseblock */
#define NAND_BBT_SCANLASTPAGE 0x00008000

/* The maximum number of blocks to scan for a bbt */
#define NAND_BBT_SCAN_MAXBLOCKS 4
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/mtd/nand.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ typedef enum {
#define NAND_NO_READRDY 0x00000100
/* Chip does not allow subpage writes */
#define NAND_NO_SUBPAGE_WRITE 0x00000200
/* Chip stores bad block marker on the last page of the eraseblock */
#define NAND_BB_LAST_PAGE 0x00000400

/* Device is one of 'new' xD cards that expose fake nand command set */
#define NAND_BROKEN_XD 0x00000400
Expand Down

0 comments on commit 9ef7e02

Please sign in to comment.