Linux Kernel
3.7.1
|
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/bbm.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/nand_ecc.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/vmalloc.h>
#include <linux/export.h>
#include <linux/string.h>
Go to the source code of this file.
Macros | |
#define | BADBLOCK_SCAN_MASK (~NAND_BBT_NO_OOB) |
Functions | |
int | nand_scan_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd) |
int | nand_update_bbt (struct mtd_info *mtd, loff_t offs) |
int | nand_default_bbt (struct mtd_info *mtd) |
int | nand_isbad_bbt (struct mtd_info *mtd, loff_t offs, int allowbbt) |
EXPORT_SYMBOL (nand_scan_bbt) | |
EXPORT_SYMBOL (nand_default_bbt) | |
EXPORT_SYMBOL_GPL (nand_update_bbt) | |
#define BADBLOCK_SCAN_MASK (~NAND_BBT_NO_OOB) |
Definition at line 1296 of file nand_bbt.c.
EXPORT_SYMBOL | ( | nand_scan_bbt | ) |
EXPORT_SYMBOL | ( | nand_default_bbt | ) |
EXPORT_SYMBOL_GPL | ( | nand_update_bbt | ) |
nand_isbad_bbt - [NAND Interface] Check if a block is bad : MTD device structure : offset in the device : allow access to bad block table region
Definition at line 1381 of file nand_bbt.c.
int nand_scan_bbt | ( | struct mtd_info * | mtd, |
struct nand_bbt_descr * | bd | ||
) |
nand_scan_bbt - [NAND Interface] scan, find, read and maybe create bad block table(s) : MTD device structure : descriptor for the good/bad block search pattern
The function checks, if a bad block table(s) is/are already available. If not it scans the device for manufacturer marked good / bad blocks and writes the bad block table(s) to the selected place.
The bad block table memory is allocated here. It must be freed by calling the nand_free_bbt function.
Definition at line 1121 of file nand_bbt.c.