mtd: nand: replace NAND_USE_FLASH_BBT with NAND_BBT_USE_FLASH
To sync with the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
68bd6e9309
commit
3cbe9b9ae9
|
@ -1196,7 +1196,7 @@ static int __init atmel_nand_probe(struct device_d *dev)
|
|||
|
||||
if (host->board->on_flash_bbt) {
|
||||
printk(KERN_INFO "atmel_nand: Use On Flash BBT\n");
|
||||
nand_chip->options |= NAND_USE_FLASH_BBT;
|
||||
nand_chip->bbt_options |= NAND_BBT_USE_FLASH;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1176,12 +1176,12 @@ int nand_default_bbt(struct mtd_info *mtd)
|
|||
this->bbt_td = &bbt_main_descr;
|
||||
this->bbt_md = &bbt_mirror_descr;
|
||||
}
|
||||
this->options |= NAND_USE_FLASH_BBT;
|
||||
this->bbt_options |= NAND_BBT_USE_FLASH;
|
||||
return nand_scan_bbt(mtd, &agand_flashbased);
|
||||
}
|
||||
|
||||
/* Is a flash based bad block table requested ? */
|
||||
if (this->options & NAND_USE_FLASH_BBT) {
|
||||
if (this->bbt_options & NAND_BBT_USE_FLASH) {
|
||||
/* Use the default pattern descriptors */
|
||||
if (!this->bbt_td) {
|
||||
this->bbt_td = &bbt_main_descr;
|
||||
|
|
|
@ -1227,7 +1227,7 @@ static int __init imxnd_probe(struct device_d *dev)
|
|||
this->bbt_td = &bbt_main_descr;
|
||||
this->bbt_md = &bbt_mirror_descr;
|
||||
/* update flash based bbt */
|
||||
this->options |= NAND_USE_FLASH_BBT;
|
||||
this->bbt_options |= NAND_BBT_USE_FLASH;
|
||||
}
|
||||
|
||||
/* first scan to find the device and get the page size */
|
||||
|
|
|
@ -469,7 +469,7 @@ static int s3c24x0_nand_probe(struct device_d *dev)
|
|||
|
||||
if (pdata->flash_bbt) {
|
||||
/* use a flash based bbt */
|
||||
chip->options |= NAND_USE_FLASH_BBT;
|
||||
chip->bbt_options |= NAND_BBT_USE_FLASH;
|
||||
}
|
||||
|
||||
ret = s3c24x0_nand_inithw(host);
|
||||
|
|
|
@ -74,7 +74,7 @@ int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
|
|||
chip->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1);
|
||||
|
||||
/* Do we have a flash based bad block table ? */
|
||||
if (IS_ENABLED(CONFIG_NAND_BBT) && chip->options & NAND_USE_FLASH_BBT)
|
||||
if (IS_ENABLED(CONFIG_NAND_BBT) && chip->bbt_options & NAND_BBT_USE_FLASH)
|
||||
ret = nand_update_bbt(mtd, ofs);
|
||||
else {
|
||||
/* We write two bytes, so we dont have to mess with 16 bit
|
||||
|
|
|
@ -80,6 +80,12 @@ struct nand_bbt_descr {
|
|||
/* Search good / bad pattern on the first and the second page */
|
||||
#define NAND_BBT_SCAN2NDPAGE 0x00004000
|
||||
|
||||
/*
|
||||
* Use a flash based bad block table. By default, OOB identifier is saved in
|
||||
* OOB area. This option is passed to the default bad block table function.
|
||||
*/
|
||||
#define NAND_BBT_USE_FLASH 0x00020000
|
||||
|
||||
/* The maximum number of blocks to scan for a bbt */
|
||||
#define NAND_BBT_SCAN_MAXBLOCKS 4
|
||||
|
||||
|
|
|
@ -189,9 +189,6 @@ typedef enum {
|
|||
#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR)
|
||||
|
||||
/* Non chip related options */
|
||||
/* Use a flash based bad block table. This option is passed to the
|
||||
* default bad block table function. */
|
||||
#define NAND_USE_FLASH_BBT 0x00010000
|
||||
/* This option skips the bbt scan during initialization. */
|
||||
#define NAND_SKIP_BBTSCAN 0x00020000
|
||||
/* This option is defined if the board driver allocates its own buffers
|
||||
|
@ -409,6 +406,9 @@ struct nand_buffers {
|
|||
* @data_poi: [INTERN] pointer to a data buffer
|
||||
* @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about
|
||||
* special functionality. See the defines for further explanation
|
||||
* @bbt_options: [INTERN] bad block specific options. All options used
|
||||
* here must come from bbm.h. By default, these options
|
||||
* will be copied to the appropriate nand_bbt_descr's.
|
||||
* @badblockpos: [INTERN] position of the bad block marker in the oob area
|
||||
* @cellinfo: [INTERN] MLC/multichip data from chip ident
|
||||
* @numchips: [INTERN] number of physical chips
|
||||
|
@ -459,6 +459,7 @@ struct nand_chip {
|
|||
|
||||
int chip_delay;
|
||||
unsigned int options;
|
||||
unsigned int bbt_options;
|
||||
|
||||
int page_shift;
|
||||
int phys_erase_shift;
|
||||
|
|
Loading…
Reference in New Issue