mtd: nand: Support using BBT in flash

Change-Id: I67c8859a711156d1264f783ec2749139999228f3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin 2020-04-27 11:30:43 +08:00 committed by Jianhong Chen
parent 747423edb6
commit d55257eea0
1 changed files with 11 additions and 0 deletions

View File

@ -122,12 +122,23 @@ struct nand_ecc_req {
#define NAND_ECCREQ(str, stp) { .strength = (str), .step_size = (stp) }
/* nand_bbt option */
#define NANDDEV_BBT_USE_FLASH BIT(0)
#define NANDDEV_BBT_SCANNED BIT(1)
/* The maximum number of blocks to scan for a bbt */
#define NANDDEV_BBT_SCAN_MAXBLOCKS 4
/**
* struct nand_bbt - bad block table object
* @cache: in memory BBT cache
* @option: the option of BBT
* @version: current memory BBT cache version
*/
struct nand_bbt {
unsigned long *cache;
unsigned int option;
unsigned int version;
};
struct nand_device;