diff options
| author | Brian Norris <computersforpeace@gmail.com> | 2013-07-30 20:52:59 -0400 |
|---|---|---|
| committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:06:00 -0400 |
| commit | fe9ec6f282ae68ee2b634189906d6f79f480e46d (patch) | |
| tree | c0ccb00f43b2f1381f1ea558bcf3f0a557273389 /include/linux/mtd | |
| parent | 62801eed490bb10ea7203191d1e8626c33e9f720 (diff) | |
mtd: nand: hide in-memory BBT implementation details
nand_base.c shouldn't have to know the implementation details of
nand_bbt's in-memory BBT. Specifically, nand_base shouldn't perform the
bit masking and shifting to isolate a BBT entry.
Instead, just move some of the BBT code into a new nand_markbad_bbt()
interface. This interface allows external users (i.e., nand_base) to
mark a single block as bad in the BBT. Then nand_bbt will take care of
modifying the in-memory BBT and updating the flash-based BBT (if
applicable).
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'include/linux/mtd')
| -rw-r--r-- | include/linux/mtd/nand.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index ab6363443ce8..05c5f9a0e5cc 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -625,8 +625,8 @@ extern struct nand_flash_dev nand_flash_ids[]; | |||
| 625 | extern struct nand_manufacturers nand_manuf_ids[]; | 625 | extern struct nand_manufacturers nand_manuf_ids[]; |
| 626 | 626 | ||
| 627 | extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd); | 627 | extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd); |
| 628 | extern int nand_update_bbt(struct mtd_info *mtd, loff_t offs); | ||
| 629 | extern int nand_default_bbt(struct mtd_info *mtd); | 628 | extern int nand_default_bbt(struct mtd_info *mtd); |
| 629 | extern int nand_markbad_bbt(struct mtd_info *mtd, loff_t offs); | ||
| 630 | extern int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt); | 630 | extern int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt); |
| 631 | extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, | 631 | extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, |
| 632 | int allowbbt); | 632 | int allowbbt); |
