diff options
31 files changed, 37 insertions, 37 deletions
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index 05cc83ea8ef7..8c07540c181c 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl | |||
@@ -572,7 +572,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) | |||
572 | </para> | 572 | </para> |
573 | <para> | 573 | <para> |
574 | The simplest way to activate the FLASH based bad block table support | 574 | The simplest way to activate the FLASH based bad block table support |
575 | is to set the option NAND_USE_FLASH_BBT in the bbt_option field of | 575 | is to set the option NAND_BBT_USE_FLASH in the bbt_option field of |
576 | the nand chip structure before calling nand_scan(). For AG-AND | 576 | the nand chip structure before calling nand_scan(). For AG-AND |
577 | chips is this done by default. | 577 | chips is this done by default. |
578 | This activates the default FLASH based bad block table functionality | 578 | This activates the default FLASH based bad block table functionality |
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index a790c1b363ff..0b36fd54fc47 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c | |||
@@ -377,7 +377,7 @@ static struct davinci_nand_pdata da830_evm_nand_pdata = { | |||
377 | .nr_parts = ARRAY_SIZE(da830_evm_nand_partitions), | 377 | .nr_parts = ARRAY_SIZE(da830_evm_nand_partitions), |
378 | .ecc_mode = NAND_ECC_HW, | 378 | .ecc_mode = NAND_ECC_HW, |
379 | .ecc_bits = 4, | 379 | .ecc_bits = 4, |
380 | .bbt_options = NAND_USE_FLASH_BBT, | 380 | .bbt_options = NAND_BBT_USE_FLASH, |
381 | .bbt_td = &da830_evm_nand_bbt_main_descr, | 381 | .bbt_td = &da830_evm_nand_bbt_main_descr, |
382 | .bbt_md = &da830_evm_nand_bbt_mirror_descr, | 382 | .bbt_md = &da830_evm_nand_bbt_mirror_descr, |
383 | .timing = &da830_evm_nandflash_timing, | 383 | .timing = &da830_evm_nandflash_timing, |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index de27111d1b27..8193d340de22 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -225,7 +225,7 @@ static struct davinci_nand_pdata da850_evm_nandflash_data = { | |||
225 | .nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition), | 225 | .nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition), |
226 | .ecc_mode = NAND_ECC_HW, | 226 | .ecc_mode = NAND_ECC_HW, |
227 | .ecc_bits = 4, | 227 | .ecc_bits = 4, |
228 | .bbt_options = NAND_USE_FLASH_BBT, | 228 | .bbt_options = NAND_BBT_USE_FLASH, |
229 | .timing = &da850_evm_nandflash_timing, | 229 | .timing = &da850_evm_nandflash_timing, |
230 | }; | 230 | }; |
231 | 231 | ||
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index fd2de2c0338b..fe617790fe2b 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -77,7 +77,7 @@ static struct davinci_nand_pdata davinci_nand_data = { | |||
77 | .parts = davinci_nand_partitions, | 77 | .parts = davinci_nand_partitions, |
78 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), | 78 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), |
79 | .ecc_mode = NAND_ECC_HW, | 79 | .ecc_mode = NAND_ECC_HW, |
80 | .bbt_options = NAND_USE_FLASH_BBT, | 80 | .bbt_options = NAND_BBT_USE_FLASH, |
81 | .ecc_bits = 4, | 81 | .ecc_bits = 4, |
82 | }; | 82 | }; |
83 | 83 | ||
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index cfbd897e6611..249c35512748 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c | |||
@@ -74,7 +74,7 @@ static struct davinci_nand_pdata davinci_nand_data = { | |||
74 | .parts = davinci_nand_partitions, | 74 | .parts = davinci_nand_partitions, |
75 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), | 75 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), |
76 | .ecc_mode = NAND_ECC_HW_SYNDROME, | 76 | .ecc_mode = NAND_ECC_HW_SYNDROME, |
77 | .bbt_options = NAND_USE_FLASH_BBT, | 77 | .bbt_options = NAND_BBT_USE_FLASH, |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static struct resource davinci_nand_resources[] = { | 80 | static struct resource davinci_nand_resources[] = { |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index e66116ddea4f..e555267f2492 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -139,7 +139,7 @@ static struct davinci_nand_pdata davinci_nand_data = { | |||
139 | .parts = davinci_nand_partitions, | 139 | .parts = davinci_nand_partitions, |
140 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), | 140 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), |
141 | .ecc_mode = NAND_ECC_HW, | 141 | .ecc_mode = NAND_ECC_HW, |
142 | .bbt_options = NAND_USE_FLASH_BBT, | 142 | .bbt_options = NAND_BBT_USE_FLASH, |
143 | .ecc_bits = 4, | 143 | .ecc_bits = 4, |
144 | }; | 144 | }; |
145 | 145 | ||
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index dde204933c9e..8fd305264e83 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -150,7 +150,7 @@ static struct davinci_nand_pdata davinci_evm_nandflash_data = { | |||
150 | .parts = davinci_evm_nandflash_partition, | 150 | .parts = davinci_evm_nandflash_partition, |
151 | .nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition), | 151 | .nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition), |
152 | .ecc_mode = NAND_ECC_HW, | 152 | .ecc_mode = NAND_ECC_HW, |
153 | .bbt_options = NAND_USE_FLASH_BBT, | 153 | .bbt_options = NAND_BBT_USE_FLASH, |
154 | .timing = &davinci_evm_nandflash_timing, | 154 | .timing = &davinci_evm_nandflash_timing, |
155 | }; | 155 | }; |
156 | 156 | ||
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index ef7ba494493d..dffab31670f7 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c | |||
@@ -396,7 +396,7 @@ static struct davinci_nand_pdata mityomapl138_nandflash_data = { | |||
396 | .parts = mityomapl138_nandflash_partition, | 396 | .parts = mityomapl138_nandflash_partition, |
397 | .nr_parts = ARRAY_SIZE(mityomapl138_nandflash_partition), | 397 | .nr_parts = ARRAY_SIZE(mityomapl138_nandflash_partition), |
398 | .ecc_mode = NAND_ECC_HW, | 398 | .ecc_mode = NAND_ECC_HW, |
399 | .bbt_options = NAND_USE_FLASH_BBT, | 399 | .bbt_options = NAND_BBT_USE_FLASH, |
400 | .options = NAND_BUSWIDTH_16, | 400 | .options = NAND_BUSWIDTH_16, |
401 | .ecc_bits = 1, /* 4 bit mode is not supported with 16 bit NAND */ | 401 | .ecc_bits = 1, /* 4 bit mode is not supported with 16 bit NAND */ |
402 | }; | 402 | }; |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 1989768973a7..70dcf9f30213 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -87,7 +87,7 @@ static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = { | |||
87 | .parts = davinci_ntosd2_nandflash_partition, | 87 | .parts = davinci_ntosd2_nandflash_partition, |
88 | .nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition), | 88 | .nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition), |
89 | .ecc_mode = NAND_ECC_HW, | 89 | .ecc_mode = NAND_ECC_HW, |
90 | .bbt_options = NAND_USE_FLASH_BBT, | 90 | .bbt_options = NAND_BBT_USE_FLASH, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static struct resource davinci_ntosd2_nandflash_resource[] = { | 93 | static struct resource davinci_ntosd2_nandflash_resource[] = { |
diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c index 046f8e00938e..75383df868ff 100644 --- a/arch/arm/mach-davinci/board-tnetv107x-evm.c +++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c | |||
@@ -144,7 +144,7 @@ static struct davinci_nand_pdata nand_config = { | |||
144 | .parts = nand_partitions, | 144 | .parts = nand_partitions, |
145 | .nr_parts = ARRAY_SIZE(nand_partitions), | 145 | .nr_parts = ARRAY_SIZE(nand_partitions), |
146 | .ecc_mode = NAND_ECC_HW, | 146 | .ecc_mode = NAND_ECC_HW, |
147 | .bbt_options = NAND_USE_FLASH_BBT, | 147 | .bbt_options = NAND_BBT_USE_FLASH, |
148 | .ecc_bits = 1, | 148 | .ecc_bits = 1, |
149 | }; | 149 | }; |
150 | 150 | ||
diff --git a/arch/arm/mach-davinci/include/mach/nand.h b/arch/arm/mach-davinci/include/mach/nand.h index 2c506f905cb8..1cf555aef896 100644 --- a/arch/arm/mach-davinci/include/mach/nand.h +++ b/arch/arm/mach-davinci/include/mach/nand.h | |||
@@ -76,7 +76,7 @@ struct davinci_nand_pdata { /* platform_data */ | |||
76 | 76 | ||
77 | /* e.g. NAND_BUSWIDTH_16 */ | 77 | /* e.g. NAND_BUSWIDTH_16 */ |
78 | unsigned options; | 78 | unsigned options; |
79 | /* e.g. NAND_USE_FLASH_BBT */ | 79 | /* e.g. NAND_BBT_USE_FLASH */ |
80 | unsigned bbt_options; | 80 | unsigned bbt_options; |
81 | 81 | ||
82 | /* Main and mirror bbt descriptor overrides */ | 82 | /* Main and mirror bbt descriptor overrides */ |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index e5ca57ce6e50..8ae53015eeb8 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -275,7 +275,7 @@ static struct platform_nand_data ts78xx_ts_nand_data = { | |||
275 | .partitions = ts78xx_ts_nand_parts, | 275 | .partitions = ts78xx_ts_nand_parts, |
276 | .nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts), | 276 | .nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts), |
277 | .chip_delay = 15, | 277 | .chip_delay = 15, |
278 | .bbt_options = NAND_USE_FLASH_BBT, | 278 | .bbt_options = NAND_BBT_USE_FLASH, |
279 | }, | 279 | }, |
280 | .ctrl = { | 280 | .ctrl = { |
281 | /* | 281 | /* |
diff --git a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c index fdd11c12b759..7fb52128ddc9 100644 --- a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c +++ b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c | |||
@@ -163,7 +163,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) | |||
163 | this->ecc.mode = NAND_ECC_SOFT; | 163 | this->ecc.mode = NAND_ECC_SOFT; |
164 | 164 | ||
165 | /* Enable the following for a flash based bad block table */ | 165 | /* Enable the following for a flash based bad block table */ |
166 | /* this->bbt_options = NAND_USE_FLASH_BBT; */ | 166 | /* this->bbt_options = NAND_BBT_USE_FLASH; */ |
167 | 167 | ||
168 | /* Scan to find existence of the device */ | 168 | /* Scan to find existence of the device */ |
169 | if (nand_scan(crisv32_mtd, 1)) { | 169 | if (nand_scan(crisv32_mtd, 1)) { |
diff --git a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c index 3368177bdd3b..e03238454b0e 100644 --- a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c +++ b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c | |||
@@ -154,7 +154,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) | |||
154 | this->ecc.mode = NAND_ECC_SOFT; | 154 | this->ecc.mode = NAND_ECC_SOFT; |
155 | 155 | ||
156 | /* Enable the following for a flash based bad block table */ | 156 | /* Enable the following for a flash based bad block table */ |
157 | /* this->bbt_options = NAND_USE_FLASH_BBT; */ | 157 | /* this->bbt_options = NAND_BBT_USE_FLASH; */ |
158 | 158 | ||
159 | /* Scan to find existence of the device */ | 159 | /* Scan to find existence of the device */ |
160 | if (nand_scan(crisv32_mtd, 1)) { | 160 | if (nand_scan(crisv32_mtd, 1)) { |
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 78d551622e11..79a7ef276616 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
@@ -583,7 +583,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
583 | 583 | ||
584 | if (on_flash_bbt) { | 584 | if (on_flash_bbt) { |
585 | printk(KERN_INFO "atmel_nand: Use On Flash BBT\n"); | 585 | printk(KERN_INFO "atmel_nand: Use On Flash BBT\n"); |
586 | nand_chip->bbt_options |= NAND_USE_FLASH_BBT; | 586 | nand_chip->bbt_options |= NAND_BBT_USE_FLASH; |
587 | } | 587 | } |
588 | 588 | ||
589 | if (!cpu_has_dma()) | 589 | if (!cpu_has_dma()) |
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c index adf934df8958..2e42ec2e8ff4 100644 --- a/drivers/mtd/nand/autcpu12.c +++ b/drivers/mtd/nand/autcpu12.c | |||
@@ -172,9 +172,9 @@ static int __init autcpu12_init(void) | |||
172 | 172 | ||
173 | /* Enable the following for a flash based bad block table */ | 173 | /* Enable the following for a flash based bad block table */ |
174 | /* | 174 | /* |
175 | this->bbt_options = NAND_USE_FLASH_BBT; | 175 | this->bbt_options = NAND_BBT_USE_FLASH; |
176 | */ | 176 | */ |
177 | this->bbt_options = NAND_USE_FLASH_BBT; | 177 | this->bbt_options = NAND_BBT_USE_FLASH; |
178 | 178 | ||
179 | /* Scan to find existence of the device */ | 179 | /* Scan to find existence of the device */ |
180 | if (nand_scan(autcpu12_mtd, 1)) { | 180 | if (nand_scan(autcpu12_mtd, 1)) { |
diff --git a/drivers/mtd/nand/bcm_umi_nand.c b/drivers/mtd/nand/bcm_umi_nand.c index 974d9bc8e48e..e3ffc4c908e4 100644 --- a/drivers/mtd/nand/bcm_umi_nand.c +++ b/drivers/mtd/nand/bcm_umi_nand.c | |||
@@ -474,7 +474,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev) | |||
474 | 474 | ||
475 | #if NAND_ECC_BCH | 475 | #if NAND_ECC_BCH |
476 | if (board_mtd->writesize > 512) { | 476 | if (board_mtd->writesize > 512) { |
477 | if (this->bbt_options & NAND_USE_FLASH_BBT) | 477 | if (this->bbt_options & NAND_BBT_USE_FLASH) |
478 | largepage_bbt.options = NAND_BBT_SCAN2NDPAGE; | 478 | largepage_bbt.options = NAND_BBT_SCAN2NDPAGE; |
479 | this->badblock_pattern = &largepage_bbt; | 479 | this->badblock_pattern = &largepage_bbt; |
480 | } | 480 | } |
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c index 7dd7d844d2cf..d0eed498ed2b 100644 --- a/drivers/mtd/nand/cafe_nand.c +++ b/drivers/mtd/nand/cafe_nand.c | |||
@@ -686,7 +686,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev, | |||
686 | cafe->nand.chip_delay = 0; | 686 | cafe->nand.chip_delay = 0; |
687 | 687 | ||
688 | /* Enable the following for a flash based bad block table */ | 688 | /* Enable the following for a flash based bad block table */ |
689 | cafe->nand.bbt_options = NAND_USE_FLASH_BBT; | 689 | cafe->nand.bbt_options = NAND_BBT_USE_FLASH; |
690 | cafe->nand.options = NAND_NO_AUTOINCR | NAND_OWN_BUFFERS; | 690 | cafe->nand.options = NAND_NO_AUTOINCR | NAND_OWN_BUFFERS; |
691 | 691 | ||
692 | if (skipbbt) { | 692 | if (skipbbt) { |
diff --git a/drivers/mtd/nand/cs553x_nand.c b/drivers/mtd/nand/cs553x_nand.c index 05adedd8c20c..b35496143e74 100644 --- a/drivers/mtd/nand/cs553x_nand.c +++ b/drivers/mtd/nand/cs553x_nand.c | |||
@@ -239,7 +239,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) | |||
239 | this->ecc.correct = nand_correct_data; | 239 | this->ecc.correct = nand_correct_data; |
240 | 240 | ||
241 | /* Enable the following for a flash based bad block table */ | 241 | /* Enable the following for a flash based bad block table */ |
242 | this->bbt_options = NAND_USE_FLASH_BBT; | 242 | this->bbt_options = NAND_BBT_USE_FLASH; |
243 | this->options = NAND_NO_AUTOINCR; | 243 | this->options = NAND_NO_AUTOINCR; |
244 | 244 | ||
245 | /* Scan to find existence of the device */ | 245 | /* Scan to find existence of the device */ |
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 69f70195ff35..a4c82b4344ba 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c | |||
@@ -581,7 +581,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev) | |||
581 | info->chip.chip_delay = 0; | 581 | info->chip.chip_delay = 0; |
582 | info->chip.select_chip = nand_davinci_select_chip; | 582 | info->chip.select_chip = nand_davinci_select_chip; |
583 | 583 | ||
584 | /* options such as NAND_USE_FLASH_BBT */ | 584 | /* options such as NAND_BBT_USE_FLASH */ |
585 | info->chip.bbt_options = pdata->bbt_options; | 585 | info->chip.bbt_options = pdata->bbt_options; |
586 | /* options such as 16-bit widths */ | 586 | /* options such as 16-bit widths */ |
587 | info->chip.options = pdata->options; | 587 | info->chip.options = pdata->options; |
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index dbb6fbae7d25..ee3014505af2 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c | |||
@@ -1577,7 +1577,7 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
1577 | denali->nand.bbt_md = &bbt_mirror_descr; | 1577 | denali->nand.bbt_md = &bbt_mirror_descr; |
1578 | 1578 | ||
1579 | /* skip the scan for now until we have OOB read and write support */ | 1579 | /* skip the scan for now until we have OOB read and write support */ |
1580 | denali->nand.bbt_options |= NAND_USE_FLASH_BBT; | 1580 | denali->nand.bbt_options |= NAND_BBT_USE_FLASH; |
1581 | denali->nand.options |= NAND_SKIP_BBTSCAN; | 1581 | denali->nand.options |= NAND_SKIP_BBTSCAN; |
1582 | denali->nand.ecc.mode = NAND_ECC_HW_SYNDROME; | 1582 | denali->nand.ecc.mode = NAND_ECC_HW_SYNDROME; |
1583 | 1583 | ||
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index f70bc73e7948..b657d7f9b05c 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
@@ -1652,7 +1652,7 @@ static int __init doc_probe(unsigned long physadr) | |||
1652 | nand->ecc.mode = NAND_ECC_HW_SYNDROME; | 1652 | nand->ecc.mode = NAND_ECC_HW_SYNDROME; |
1653 | nand->ecc.size = 512; | 1653 | nand->ecc.size = 512; |
1654 | nand->ecc.bytes = 6; | 1654 | nand->ecc.bytes = 6; |
1655 | nand->bbt_options = NAND_USE_FLASH_BBT; | 1655 | nand->bbt_options = NAND_BBT_USE_FLASH; |
1656 | 1656 | ||
1657 | doc->physadr = physadr; | 1657 | doc->physadr = physadr; |
1658 | doc->virtadr = virtadr; | 1658 | doc->virtadr = virtadr; |
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index bff4791d73c3..d4ea5fe013b7 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
@@ -792,7 +792,7 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv) | |||
792 | 792 | ||
793 | /* set up nand options */ | 793 | /* set up nand options */ |
794 | chip->options = NAND_NO_READRDY | NAND_NO_AUTOINCR; | 794 | chip->options = NAND_NO_READRDY | NAND_NO_AUTOINCR; |
795 | chip->bbt_options = NAND_USE_FLASH_BBT; | 795 | chip->bbt_options = NAND_BBT_USE_FLASH; |
796 | 796 | ||
797 | chip->controller = &elbc_fcm_ctrl->controller; | 797 | chip->controller = &elbc_fcm_ctrl->controller; |
798 | chip->priv = priv; | 798 | chip->priv = priv; |
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 0ac64b54bd67..2f2c35a7771e 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c | |||
@@ -736,7 +736,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op) | |||
736 | chip->verify_buf = mpc5121_nfc_verify_buf; | 736 | chip->verify_buf = mpc5121_nfc_verify_buf; |
737 | chip->select_chip = mpc5121_nfc_select_chip; | 737 | chip->select_chip = mpc5121_nfc_select_chip; |
738 | chip->options = NAND_NO_AUTOINCR; | 738 | chip->options = NAND_NO_AUTOINCR; |
739 | chip->bbt_options = NAND_USE_FLASH_BBT; | 739 | chip->bbt_options = NAND_BBT_USE_FLASH; |
740 | chip->ecc.mode = NAND_ECC_SOFT; | 740 | chip->ecc.mode = NAND_ECC_SOFT; |
741 | 741 | ||
742 | /* Support external chip-select logic on ADS5121 board */ | 742 | /* Support external chip-select logic on ADS5121 board */ |
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index ed68fde3d1be..ca42c8f335b3 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c | |||
@@ -1179,7 +1179,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) | |||
1179 | this->bbt_td = &bbt_main_descr; | 1179 | this->bbt_td = &bbt_main_descr; |
1180 | this->bbt_md = &bbt_mirror_descr; | 1180 | this->bbt_md = &bbt_mirror_descr; |
1181 | /* update flash based bbt */ | 1181 | /* update flash based bbt */ |
1182 | this->bbt_options |= NAND_USE_FLASH_BBT; | 1182 | this->bbt_options |= NAND_BBT_USE_FLASH; |
1183 | } | 1183 | } |
1184 | 1184 | ||
1185 | init_completion(&host->op_completion); | 1185 | init_completion(&host->op_completion); |
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index d39dffe71de4..422e7872d6db 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -405,7 +405,7 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) | |||
405 | chip->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1); | 405 | chip->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1); |
406 | 406 | ||
407 | /* Do we have a flash based bad block table ? */ | 407 | /* Do we have a flash based bad block table ? */ |
408 | if (chip->bbt_options & NAND_USE_FLASH_BBT) | 408 | if (chip->bbt_options & NAND_BBT_USE_FLASH) |
409 | ret = nand_update_bbt(mtd, ofs); | 409 | ret = nand_update_bbt(mtd, ofs); |
410 | else { | 410 | else { |
411 | nand_get_device(chip, mtd, FL_WRITING); | 411 | nand_get_device(chip, mtd, FL_WRITING); |
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 66f93e2ac16b..dfea9fd1d61c 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * | 14 | * |
15 | * When nand_scan_bbt is called, then it tries to find the bad block table | 15 | * When nand_scan_bbt is called, then it tries to find the bad block table |
16 | * depending on the options in the BBT descriptor(s). If no flash based BBT | 16 | * depending on the options in the BBT descriptor(s). If no flash based BBT |
17 | * (NAND_USE_FLASH_BBT) is specified then the device is scanned for factory | 17 | * (NAND_BBT_USE_FLASH) is specified then the device is scanned for factory |
18 | * marked good / bad blocks. This information is used to create a memory BBT. | 18 | * marked good / bad blocks. This information is used to create a memory BBT. |
19 | * Once a new bad block is discovered then the "factory" information is updated | 19 | * Once a new bad block is discovered then the "factory" information is updated |
20 | * on the device. | 20 | * on the device. |
@@ -36,7 +36,7 @@ | |||
36 | * The table is marked in the OOB area with an ident pattern and a version | 36 | * The table is marked in the OOB area with an ident pattern and a version |
37 | * number which indicates which of both tables is more up to date. If the NAND | 37 | * number which indicates which of both tables is more up to date. If the NAND |
38 | * controller needs the complete OOB area for the ECC information then the | 38 | * controller needs the complete OOB area for the ECC information then the |
39 | * option NAND_BBT_NO_OOB should be used (along with NAND_USE_FLASH_BBT, of | 39 | * option NAND_BBT_NO_OOB should be used (along with NAND_BBT_USE_FLASH, of |
40 | * course): it moves the ident pattern and the version byte into the data area | 40 | * course): it moves the ident pattern and the version byte into the data area |
41 | * and the OOB area will remain untouched. | 41 | * and the OOB area will remain untouched. |
42 | * | 42 | * |
@@ -1083,14 +1083,14 @@ static void verify_bbt_descr(struct mtd_info *mtd, struct nand_bbt_descr *bd) | |||
1083 | bits = bd->options & NAND_BBT_NRBITS_MSK; | 1083 | bits = bd->options & NAND_BBT_NRBITS_MSK; |
1084 | 1084 | ||
1085 | BUG_ON((this->bbt_options & NAND_BBT_NO_OOB) && | 1085 | BUG_ON((this->bbt_options & NAND_BBT_NO_OOB) && |
1086 | !(this->bbt_options & NAND_USE_FLASH_BBT)); | 1086 | !(this->bbt_options & NAND_BBT_USE_FLASH)); |
1087 | BUG_ON(!bits); | 1087 | BUG_ON(!bits); |
1088 | 1088 | ||
1089 | if (bd->options & NAND_BBT_VERSION) | 1089 | if (bd->options & NAND_BBT_VERSION) |
1090 | pattern_len++; | 1090 | pattern_len++; |
1091 | 1091 | ||
1092 | if (bd->options & NAND_BBT_NO_OOB) { | 1092 | if (bd->options & NAND_BBT_NO_OOB) { |
1093 | BUG_ON(!(this->bbt_options & NAND_USE_FLASH_BBT)); | 1093 | BUG_ON(!(this->bbt_options & NAND_BBT_USE_FLASH)); |
1094 | BUG_ON(!(this->bbt_options & NAND_BBT_NO_OOB)); | 1094 | BUG_ON(!(this->bbt_options & NAND_BBT_NO_OOB)); |
1095 | BUG_ON(bd->offs); | 1095 | BUG_ON(bd->offs); |
1096 | if (bd->options & NAND_BBT_VERSION) | 1096 | if (bd->options & NAND_BBT_VERSION) |
@@ -1357,12 +1357,12 @@ int nand_default_bbt(struct mtd_info *mtd) | |||
1357 | this->bbt_td = &bbt_main_descr; | 1357 | this->bbt_td = &bbt_main_descr; |
1358 | this->bbt_md = &bbt_mirror_descr; | 1358 | this->bbt_md = &bbt_mirror_descr; |
1359 | } | 1359 | } |
1360 | this->bbt_options |= NAND_USE_FLASH_BBT; | 1360 | this->bbt_options |= NAND_BBT_USE_FLASH; |
1361 | return nand_scan_bbt(mtd, &agand_flashbased); | 1361 | return nand_scan_bbt(mtd, &agand_flashbased); |
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | /* Is a flash based bad block table requested ? */ | 1364 | /* Is a flash based bad block table requested ? */ |
1365 | if (this->bbt_options & NAND_USE_FLASH_BBT) { | 1365 | if (this->bbt_options & NAND_BBT_USE_FLASH) { |
1366 | /* Use the default pattern descriptors */ | 1366 | /* Use the default pattern descriptors */ |
1367 | if (!this->bbt_td) { | 1367 | if (!this->bbt_td) { |
1368 | if (this->bbt_options & NAND_BBT_NO_OOB) { | 1368 | if (this->bbt_options & NAND_BBT_NO_OOB) { |
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 1856c42c62c4..34c03be77301 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c | |||
@@ -2275,7 +2275,7 @@ static int __init ns_init_module(void) | |||
2275 | case 2: | 2275 | case 2: |
2276 | chip->bbt_options |= NAND_BBT_NO_OOB; | 2276 | chip->bbt_options |= NAND_BBT_NO_OOB; |
2277 | case 1: | 2277 | case 1: |
2278 | chip->bbt_options |= NAND_USE_FLASH_BBT; | 2278 | chip->bbt_options |= NAND_BBT_USE_FLASH; |
2279 | case 0: | 2279 | case 0: |
2280 | break; | 2280 | break; |
2281 | default: | 2281 | default: |
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index 1c17f091e16b..a97264ececdb 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c | |||
@@ -156,7 +156,7 @@ static int __devinit pasemi_nand_probe(struct platform_device *ofdev) | |||
156 | 156 | ||
157 | /* Enable the following for a flash based bad block table */ | 157 | /* Enable the following for a flash based bad block table */ |
158 | chip->options = NAND_NO_AUTOINCR; | 158 | chip->options = NAND_NO_AUTOINCR; |
159 | chip->bbt_options = NAND_USE_FLASH_BBT; | 159 | chip->bbt_options = NAND_BBT_USE_FLASH; |
160 | 160 | ||
161 | /* Scan to find existence of the device */ | 161 | /* Scan to find existence of the device */ |
162 | if (nand_scan(pasemi_nand_mtd, 1)) { | 162 | if (nand_scan(pasemi_nand_mtd, 1)) { |
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 370516c3f7c7..ec280798e221 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -881,7 +881,7 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info, | |||
881 | * let the kernel fish out the BBT from the NAND, and also skip the | 881 | * let the kernel fish out the BBT from the NAND, and also skip the |
882 | * full NAND scan that can take 1/2s or so. Little things... */ | 882 | * full NAND scan that can take 1/2s or so. Little things... */ |
883 | if (set->flash_bbt) { | 883 | if (set->flash_bbt) { |
884 | chip->bbt_options |= NAND_USE_FLASH_BBT; | 884 | chip->bbt_options |= NAND_BBT_USE_FLASH; |
885 | chip->options |= NAND_SKIP_BBTSCAN; | 885 | chip->options |= NAND_SKIP_BBTSCAN; |
886 | } | 886 | } |
887 | } | 887 | } |
diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h index 7929514781ea..ff18c0850519 100644 --- a/include/linux/mtd/bbm.h +++ b/include/linux/mtd/bbm.h | |||
@@ -104,7 +104,7 @@ struct nand_bbt_descr { | |||
104 | * Use a flash based bad block table. By default, OOB identifier is saved in | 104 | * Use a flash based bad block table. By default, OOB identifier is saved in |
105 | * OOB area. This option is passed to the default bad block table function. | 105 | * OOB area. This option is passed to the default bad block table function. |
106 | */ | 106 | */ |
107 | #define NAND_USE_FLASH_BBT 0x00040000 | 107 | #define NAND_BBT_USE_FLASH 0x00040000 |
108 | /* Do not store flash based bad block table in OOB area; store it in-band */ | 108 | /* Do not store flash based bad block table in OOB area; store it in-band */ |
109 | #define NAND_BBT_NO_OOB 0x00080000 | 109 | #define NAND_BBT_NO_OOB 0x00080000 |
110 | 110 | ||