You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
mtd: nand: rename NAND_USE_FLASH_BBT
Recall the recently added prefix requirements:
* "NAND_" for flags in nand.h, used in nand_chip.options
* "NAND_BBT_" for flags in bbm.h, used in nand_chip.bbt_options
or in nand_bbt_descr.options
Thus, I am changing NAND_USE_FLASH_BBT to NAND_BBT_USE_FLASH.
Again, this flag is found in bbm.h and so should NOT be used in the
"nand_chip.options" field.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
committed by
Artem Bityutskiy
parent
a40f73419f
commit
bb9ebd4e71
@@ -572,7 +572,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The simplest way to activate the FLASH based bad block table support
|
The simplest way to activate the FLASH based bad block table support
|
||||||
is to set the option NAND_USE_FLASH_BBT in the bbt_option field of
|
is to set the option NAND_BBT_USE_FLASH in the bbt_option field of
|
||||||
the nand chip structure before calling nand_scan(). For AG-AND
|
the nand chip structure before calling nand_scan(). For AG-AND
|
||||||
chips is this done by default.
|
chips is this done by default.
|
||||||
This activates the default FLASH based bad block table functionality
|
This activates the default FLASH based bad block table functionality
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ static struct davinci_nand_pdata da830_evm_nand_pdata = {
|
|||||||
.nr_parts = ARRAY_SIZE(da830_evm_nand_partitions),
|
.nr_parts = ARRAY_SIZE(da830_evm_nand_partitions),
|
||||||
.ecc_mode = NAND_ECC_HW,
|
.ecc_mode = NAND_ECC_HW,
|
||||||
.ecc_bits = 4,
|
.ecc_bits = 4,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
.bbt_td = &da830_evm_nand_bbt_main_descr,
|
.bbt_td = &da830_evm_nand_bbt_main_descr,
|
||||||
.bbt_md = &da830_evm_nand_bbt_mirror_descr,
|
.bbt_md = &da830_evm_nand_bbt_mirror_descr,
|
||||||
.timing = &da830_evm_nandflash_timing,
|
.timing = &da830_evm_nandflash_timing,
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ static struct davinci_nand_pdata da850_evm_nandflash_data = {
|
|||||||
.nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition),
|
.nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition),
|
||||||
.ecc_mode = NAND_ECC_HW,
|
.ecc_mode = NAND_ECC_HW,
|
||||||
.ecc_bits = 4,
|
.ecc_bits = 4,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
.timing = &da850_evm_nandflash_timing,
|
.timing = &da850_evm_nandflash_timing,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
|
|||||||
.parts = davinci_nand_partitions,
|
.parts = davinci_nand_partitions,
|
||||||
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
|
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
|
||||||
.ecc_mode = NAND_ECC_HW,
|
.ecc_mode = NAND_ECC_HW,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
.ecc_bits = 4,
|
.ecc_bits = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
|
|||||||
.parts = davinci_nand_partitions,
|
.parts = davinci_nand_partitions,
|
||||||
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
|
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
|
||||||
.ecc_mode = NAND_ECC_HW_SYNDROME,
|
.ecc_mode = NAND_ECC_HW_SYNDROME,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct resource davinci_nand_resources[] = {
|
static struct resource davinci_nand_resources[] = {
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
|
|||||||
.parts = davinci_nand_partitions,
|
.parts = davinci_nand_partitions,
|
||||||
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
|
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
|
||||||
.ecc_mode = NAND_ECC_HW,
|
.ecc_mode = NAND_ECC_HW,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
.ecc_bits = 4,
|
.ecc_bits = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ static struct davinci_nand_pdata davinci_evm_nandflash_data = {
|
|||||||
.parts = davinci_evm_nandflash_partition,
|
.parts = davinci_evm_nandflash_partition,
|
||||||
.nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition),
|
.nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition),
|
||||||
.ecc_mode = NAND_ECC_HW,
|
.ecc_mode = NAND_ECC_HW,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
.timing = &davinci_evm_nandflash_timing,
|
.timing = &davinci_evm_nandflash_timing,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ static struct davinci_nand_pdata mityomapl138_nandflash_data = {
|
|||||||
.parts = mityomapl138_nandflash_partition,
|
.parts = mityomapl138_nandflash_partition,
|
||||||
.nr_parts = ARRAY_SIZE(mityomapl138_nandflash_partition),
|
.nr_parts = ARRAY_SIZE(mityomapl138_nandflash_partition),
|
||||||
.ecc_mode = NAND_ECC_HW,
|
.ecc_mode = NAND_ECC_HW,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
.options = NAND_BUSWIDTH_16,
|
.options = NAND_BUSWIDTH_16,
|
||||||
.ecc_bits = 1, /* 4 bit mode is not supported with 16 bit NAND */
|
.ecc_bits = 1, /* 4 bit mode is not supported with 16 bit NAND */
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = {
|
|||||||
.parts = davinci_ntosd2_nandflash_partition,
|
.parts = davinci_ntosd2_nandflash_partition,
|
||||||
.nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition),
|
.nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition),
|
||||||
.ecc_mode = NAND_ECC_HW,
|
.ecc_mode = NAND_ECC_HW,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct resource davinci_ntosd2_nandflash_resource[] = {
|
static struct resource davinci_ntosd2_nandflash_resource[] = {
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ static struct davinci_nand_pdata nand_config = {
|
|||||||
.parts = nand_partitions,
|
.parts = nand_partitions,
|
||||||
.nr_parts = ARRAY_SIZE(nand_partitions),
|
.nr_parts = ARRAY_SIZE(nand_partitions),
|
||||||
.ecc_mode = NAND_ECC_HW,
|
.ecc_mode = NAND_ECC_HW,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
.ecc_bits = 1,
|
.ecc_bits = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ struct davinci_nand_pdata { /* platform_data */
|
|||||||
|
|
||||||
/* e.g. NAND_BUSWIDTH_16 */
|
/* e.g. NAND_BUSWIDTH_16 */
|
||||||
unsigned options;
|
unsigned options;
|
||||||
/* e.g. NAND_USE_FLASH_BBT */
|
/* e.g. NAND_BBT_USE_FLASH */
|
||||||
unsigned bbt_options;
|
unsigned bbt_options;
|
||||||
|
|
||||||
/* Main and mirror bbt descriptor overrides */
|
/* Main and mirror bbt descriptor overrides */
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ static struct platform_nand_data ts78xx_ts_nand_data = {
|
|||||||
.partitions = ts78xx_ts_nand_parts,
|
.partitions = ts78xx_ts_nand_parts,
|
||||||
.nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts),
|
.nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts),
|
||||||
.chip_delay = 15,
|
.chip_delay = 15,
|
||||||
.bbt_options = NAND_USE_FLASH_BBT,
|
.bbt_options = NAND_BBT_USE_FLASH,
|
||||||
},
|
},
|
||||||
.ctrl = {
|
.ctrl = {
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
|
|||||||
this->ecc.mode = NAND_ECC_SOFT;
|
this->ecc.mode = NAND_ECC_SOFT;
|
||||||
|
|
||||||
/* Enable the following for a flash based bad block table */
|
/* Enable the following for a flash based bad block table */
|
||||||
/* this->bbt_options = NAND_USE_FLASH_BBT; */
|
/* this->bbt_options = NAND_BBT_USE_FLASH; */
|
||||||
|
|
||||||
/* Scan to find existence of the device */
|
/* Scan to find existence of the device */
|
||||||
if (nand_scan(crisv32_mtd, 1)) {
|
if (nand_scan(crisv32_mtd, 1)) {
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
|
|||||||
this->ecc.mode = NAND_ECC_SOFT;
|
this->ecc.mode = NAND_ECC_SOFT;
|
||||||
|
|
||||||
/* Enable the following for a flash based bad block table */
|
/* Enable the following for a flash based bad block table */
|
||||||
/* this->bbt_options = NAND_USE_FLASH_BBT; */
|
/* this->bbt_options = NAND_BBT_USE_FLASH; */
|
||||||
|
|
||||||
/* Scan to find existence of the device */
|
/* Scan to find existence of the device */
|
||||||
if (nand_scan(crisv32_mtd, 1)) {
|
if (nand_scan(crisv32_mtd, 1)) {
|
||||||
|
|||||||
@@ -583,7 +583,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
if (on_flash_bbt) {
|
if (on_flash_bbt) {
|
||||||
printk(KERN_INFO "atmel_nand: Use On Flash BBT\n");
|
printk(KERN_INFO "atmel_nand: Use On Flash BBT\n");
|
||||||
nand_chip->bbt_options |= NAND_USE_FLASH_BBT;
|
nand_chip->bbt_options |= NAND_BBT_USE_FLASH;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cpu_has_dma())
|
if (!cpu_has_dma())
|
||||||
|
|||||||
@@ -172,9 +172,9 @@ static int __init autcpu12_init(void)
|
|||||||
|
|
||||||
/* Enable the following for a flash based bad block table */
|
/* Enable the following for a flash based bad block table */
|
||||||
/*
|
/*
|
||||||
this->bbt_options = NAND_USE_FLASH_BBT;
|
this->bbt_options = NAND_BBT_USE_FLASH;
|
||||||
*/
|
*/
|
||||||
this->bbt_options = NAND_USE_FLASH_BBT;
|
this->bbt_options = NAND_BBT_USE_FLASH;
|
||||||
|
|
||||||
/* Scan to find existence of the device */
|
/* Scan to find existence of the device */
|
||||||
if (nand_scan(autcpu12_mtd, 1)) {
|
if (nand_scan(autcpu12_mtd, 1)) {
|
||||||
|
|||||||
@@ -474,7 +474,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
#if NAND_ECC_BCH
|
#if NAND_ECC_BCH
|
||||||
if (board_mtd->writesize > 512) {
|
if (board_mtd->writesize > 512) {
|
||||||
if (this->bbt_options & NAND_USE_FLASH_BBT)
|
if (this->bbt_options & NAND_BBT_USE_FLASH)
|
||||||
largepage_bbt.options = NAND_BBT_SCAN2NDPAGE;
|
largepage_bbt.options = NAND_BBT_SCAN2NDPAGE;
|
||||||
this->badblock_pattern = &largepage_bbt;
|
this->badblock_pattern = &largepage_bbt;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -686,7 +686,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
|
|||||||
cafe->nand.chip_delay = 0;
|
cafe->nand.chip_delay = 0;
|
||||||
|
|
||||||
/* Enable the following for a flash based bad block table */
|
/* Enable the following for a flash based bad block table */
|
||||||
cafe->nand.bbt_options = NAND_USE_FLASH_BBT;
|
cafe->nand.bbt_options = NAND_BBT_USE_FLASH;
|
||||||
cafe->nand.options = NAND_NO_AUTOINCR | NAND_OWN_BUFFERS;
|
cafe->nand.options = NAND_NO_AUTOINCR | NAND_OWN_BUFFERS;
|
||||||
|
|
||||||
if (skipbbt) {
|
if (skipbbt) {
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr)
|
|||||||
this->ecc.correct = nand_correct_data;
|
this->ecc.correct = nand_correct_data;
|
||||||
|
|
||||||
/* Enable the following for a flash based bad block table */
|
/* Enable the following for a flash based bad block table */
|
||||||
this->bbt_options = NAND_USE_FLASH_BBT;
|
this->bbt_options = NAND_BBT_USE_FLASH;
|
||||||
this->options = NAND_NO_AUTOINCR;
|
this->options = NAND_NO_AUTOINCR;
|
||||||
|
|
||||||
/* Scan to find existence of the device */
|
/* Scan to find existence of the device */
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
|
|||||||
info->chip.chip_delay = 0;
|
info->chip.chip_delay = 0;
|
||||||
info->chip.select_chip = nand_davinci_select_chip;
|
info->chip.select_chip = nand_davinci_select_chip;
|
||||||
|
|
||||||
/* options such as NAND_USE_FLASH_BBT */
|
/* options such as NAND_BBT_USE_FLASH */
|
||||||
info->chip.bbt_options = pdata->bbt_options;
|
info->chip.bbt_options = pdata->bbt_options;
|
||||||
/* options such as 16-bit widths */
|
/* options such as 16-bit widths */
|
||||||
info->chip.options = pdata->options;
|
info->chip.options = pdata->options;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user