aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-05-31 19:31:22 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 08:01:56 -0400
commita40f73419f02e40555f692785ea1c1813d5b4c12 (patch)
tree81f3eeb517d6480d8535ac769202eb8e26de53c4 /arch
parent5fb1549dfc40f3b589dae560ea21535cdc5f64e0 (diff)
mtd: nand: consolidate redundant flash-based BBT flags
This patch works with the following three flags from two headers (nand.h and bbm.h): (1) NAND_USE_FLASH_BBT (nand.h) (2) NAND_USE_FLASH_BBT_NO_OOB (nand.h) (3) NAND_BBT_NO_OOB (bbm.h) These flags are all related and interdependent, yet they were in different headers. Flag (2) is simply the combination of (1) and (3) and can be eliminated. This patch accomplishes the following: * eliminate NAND_USE_FLASH_BBT_NO_OOB (i.e., flag (2)) * move NAND_USE_FLASH_BBT (i.e., flag (1)) to bbm.h It's important to note that because (1) and (3) are now both found in bbm.h, they should NOT be used in the "nand_chip.options" field. I removed a small section from the mtdnand DocBook because it referes to NAND_USE_FLASH_BBT in nand.h, which has been moved to bbm.h. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-dm355-leopard.c2
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-mityomapl138.c3
-rw-r--r--arch/arm/mach-davinci/board-neuros-osd2.c2
-rw-r--r--arch/arm/mach-davinci/board-tnetv107x-evm.c2
-rw-r--r--arch/arm/mach-davinci/include/mach/nand.h4
-rw-r--r--arch/arm/mach-orion5x/ts78xx-setup.c2
-rw-r--r--arch/cris/arch-v32/drivers/mach-a3/nandflash.c2
-rw-r--r--arch/cris/arch-v32/drivers/mach-fs/nandflash.c2
13 files changed, 16 insertions, 13 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 84fd78684868..a790c1b363ff 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 .options = NAND_USE_FLASH_BBT, 380 .bbt_options = NAND_USE_FLASH_BBT,
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 bd5394537c88..de27111d1b27 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 .options = NAND_USE_FLASH_BBT, 228 .bbt_options = NAND_USE_FLASH_BBT,
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 241a6bd67408..fd2de2c0338b 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 .options = NAND_USE_FLASH_BBT, 80 .bbt_options = NAND_USE_FLASH_BBT,
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 bee284ca7fd6..cfbd897e6611 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 .options = NAND_USE_FLASH_BBT, 77 .bbt_options = NAND_USE_FLASH_BBT,
78}; 78};
79 79
80static struct resource davinci_nand_resources[] = { 80static 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 9818f214d4f0..e66116ddea4f 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 .options = NAND_USE_FLASH_BBT, 142 .bbt_options = NAND_USE_FLASH_BBT,
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 95607a191e03..dde204933c9e 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 .options = NAND_USE_FLASH_BBT, 153 .bbt_options = NAND_USE_FLASH_BBT,
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 c278226627ad..ef7ba494493d 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -396,7 +396,8 @@ 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 .options = NAND_USE_FLASH_BBT | NAND_BUSWIDTH_16, 399 .bbt_options = NAND_USE_FLASH_BBT,
400 .options = NAND_BUSWIDTH_16,
400 .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 */
401}; 402};
402 403
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index d60a80028ba3..1989768973a7 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 .options = NAND_USE_FLASH_BBT, 90 .bbt_options = NAND_USE_FLASH_BBT,
91}; 91};
92 92
93static struct resource davinci_ntosd2_nandflash_resource[] = { 93static 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 782892065682..046f8e00938e 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 .options = NAND_USE_FLASH_BBT, 147 .bbt_options = NAND_USE_FLASH_BBT,
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 025151049f05..2c506f905cb8 100644
--- a/arch/arm/mach-davinci/include/mach/nand.h
+++ b/arch/arm/mach-davinci/include/mach/nand.h
@@ -74,8 +74,10 @@ struct davinci_nand_pdata { /* platform_data */
74 nand_ecc_modes_t ecc_mode; 74 nand_ecc_modes_t ecc_mode;
75 u8 ecc_bits; 75 u8 ecc_bits;
76 76
77 /* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */ 77 /* e.g. NAND_BUSWIDTH_16 */
78 unsigned options; 78 unsigned options;
79 /* e.g. NAND_USE_FLASH_BBT */
80 unsigned bbt_options;
79 81
80 /* Main and mirror bbt descriptor overrides */ 82 /* Main and mirror bbt descriptor overrides */
81 struct nand_bbt_descr *bbt_td; 83 struct nand_bbt_descr *bbt_td;
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index 6b7b54116f30..e5ca57ce6e50 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 .options = NAND_USE_FLASH_BBT, 278 .bbt_options = NAND_USE_FLASH_BBT,
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 f58f2c1c5295..fdd11c12b759 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->options = NAND_USE_FLASH_BBT; */ 166 /* this->bbt_options = NAND_USE_FLASH_BBT; */
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 d5b0cc9f976b..3368177bdd3b 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->options = NAND_USE_FLASH_BBT; */ 157 /* this->bbt_options = NAND_USE_FLASH_BBT; */
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)) {