mtd: nand: rename NAND_USE_FLASH_BBT
authorBrian Norris <computersforpeace@gmail.com>
Tue, 31 May 2011 23:31:23 +0000 (16:31 -0700)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Sun, 11 Sep 2011 12:01:56 +0000 (15:01 +0300)
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>
31 files changed:
Documentation/DocBook/mtdnand.tmpl
arch/arm/mach-davinci/board-da830-evm.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm355-leopard.c
arch/arm/mach-davinci/board-dm365-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-mityomapl138.c
arch/arm/mach-davinci/board-neuros-osd2.c
arch/arm/mach-davinci/board-tnetv107x-evm.c
arch/arm/mach-davinci/include/mach/nand.h
arch/arm/mach-orion5x/ts78xx-setup.c
arch/cris/arch-v32/drivers/mach-a3/nandflash.c
arch/cris/arch-v32/drivers/mach-fs/nandflash.c
drivers/mtd/nand/atmel_nand.c
drivers/mtd/nand/autcpu12.c
drivers/mtd/nand/bcm_umi_nand.c
drivers/mtd/nand/cafe_nand.c
drivers/mtd/nand/cs553x_nand.c
drivers/mtd/nand/davinci_nand.c
drivers/mtd/nand/denali.c
drivers/mtd/nand/diskonchip.c
drivers/mtd/nand/fsl_elbc_nand.c
drivers/mtd/nand/mpc5121_nfc.c
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
drivers/mtd/nand/nandsim.c
drivers/mtd/nand/pasemi_nand.c
drivers/mtd/nand/s3c2410.c
include/linux/mtd/bbm.h

index 05cc83ea8ef7d9b490293b849276d28c5c33ea68..8c07540c181cd86c6ebc90728cadcc968c27a95e 100644 (file)
@@ -572,7 +572,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
                        </para>
                        <para>
                                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
                                chips is this done by default.
                                This activates the default FLASH based bad block table functionality 
index a790c1b363ff806e84d70fdb0b18ae723b04c957..0b36fd54fc47491b93352bc531ddf8affa073f8b 100644 (file)
@@ -377,7 +377,7 @@ static struct davinci_nand_pdata da830_evm_nand_pdata = {
        .nr_parts       = ARRAY_SIZE(da830_evm_nand_partitions),
        .ecc_mode       = NAND_ECC_HW,
        .ecc_bits       = 4,
-       .bbt_options    = NAND_USE_FLASH_BBT,
+       .bbt_options    = NAND_BBT_USE_FLASH,
        .bbt_td         = &da830_evm_nand_bbt_main_descr,
        .bbt_md         = &da830_evm_nand_bbt_mirror_descr,
        .timing         = &da830_evm_nandflash_timing,
index de27111d1b27a1625978188755d41d962dc34fa3..8193d340de22b3d0f39fca1489f35e5bbe60d98e 100644 (file)
@@ -225,7 +225,7 @@ static struct davinci_nand_pdata da850_evm_nandflash_data = {
        .nr_parts       = ARRAY_SIZE(da850_evm_nandflash_partition),
        .ecc_mode       = NAND_ECC_HW,
        .ecc_bits       = 4,
-       .bbt_options    = NAND_USE_FLASH_BBT,
+       .bbt_options    = NAND_BBT_USE_FLASH,
        .timing         = &da850_evm_nandflash_timing,
 };
 
index fd2de2c0338bc4aabebb1d1ceb0cfc99265b4f82..fe617790fe2b84d93d538365d4ede22b7d9eb338 100644 (file)
@@ -77,7 +77,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
        .parts                  = davinci_nand_partitions,
        .nr_parts               = ARRAY_SIZE(davinci_nand_partitions),
        .ecc_mode               = NAND_ECC_HW,
-       .bbt_options            = NAND_USE_FLASH_BBT,
+       .bbt_options            = NAND_BBT_USE_FLASH,
        .ecc_bits               = 4,
 };
 
index cfbd897e661103b06dbfe9dc4a23bd47653b5dc5..249c355127481567263d94117bcad01a9ff4d64c 100644 (file)
@@ -74,7 +74,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
        .parts                  = davinci_nand_partitions,
        .nr_parts               = ARRAY_SIZE(davinci_nand_partitions),
        .ecc_mode               = NAND_ECC_HW_SYNDROME,
-       .bbt_options            = NAND_USE_FLASH_BBT,
+       .bbt_options            = NAND_BBT_USE_FLASH,
 };
 
 static struct resource davinci_nand_resources[] = {
index e66116ddea4f65478c190d7d401bf33bf16dded2..e555267f249289777cbbea0016a0e1e080ddd14f 100644 (file)
@@ -139,7 +139,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
        .parts                  = davinci_nand_partitions,
        .nr_parts               = ARRAY_SIZE(davinci_nand_partitions),
        .ecc_mode               = NAND_ECC_HW,
-       .bbt_options            = NAND_USE_FLASH_BBT,
+       .bbt_options            = NAND_BBT_USE_FLASH,
        .ecc_bits               = 4,
 };
 
index dde204933c9e6fd68a997b42fb785bbf8d04815d..8fd305264e83154cbb7c4d20c397b1b98cb5cc68 100644 (file)
@@ -150,7 +150,7 @@ static struct davinci_nand_pdata davinci_evm_nandflash_data = {
        .parts          = davinci_evm_nandflash_partition,
        .nr_parts       = ARRAY_SIZE(davinci_evm_nandflash_partition),
        .ecc_mode       = NAND_ECC_HW,
-       .bbt_options    = NAND_USE_FLASH_BBT,
+       .bbt_options    = NAND_BBT_USE_FLASH,
        .timing         = &davinci_evm_nandflash_timing,
 };
 
index ef7ba494493dab5f338c69a98bb446a0e375d818..dffab31670f7e0c45f99a00be82e22634044f6ec 100644 (file)
@@ -396,7 +396,7 @@ static struct davinci_nand_pdata mityomapl138_nandflash_data = {
        .parts          = mityomapl138_nandflash_partition,
        .nr_parts       = ARRAY_SIZE(mityomapl138_nandflash_partition),
        .ecc_mode       = NAND_ECC_HW,
-       .bbt_options    = NAND_USE_FLASH_BBT,
+       .bbt_options    = NAND_BBT_USE_FLASH,
        .options        = NAND_BUSWIDTH_16,
        .ecc_bits       = 1, /* 4 bit mode is not supported with 16 bit NAND */
 };
index 1989768973a78eaacace7a2005939f932026e74b..70dcf9f30213a2e249bf1a7882b25245508cc907 100644 (file)
@@ -87,7 +87,7 @@ static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = {
        .parts          = davinci_ntosd2_nandflash_partition,
        .nr_parts       = ARRAY_SIZE(davinci_ntosd2_nandflash_partition),
        .ecc_mode       = NAND_ECC_HW,
-       .bbt_options    = NAND_USE_FLASH_BBT,
+       .bbt_options    = NAND_BBT_USE_FLASH,
 };
 
 static struct resource davinci_ntosd2_nandflash_resource[] = {
index 046f8e00938e950c7d9df947dcbb6561e6fc9a2a..75383df868ffe90bc15516e6d5968a7fcad0547d 100644 (file)
@@ -144,7 +144,7 @@ static struct davinci_nand_pdata nand_config = {
        .parts          = nand_partitions,
        .nr_parts       = ARRAY_SIZE(nand_partitions),
        .ecc_mode       = NAND_ECC_HW,
-       .bbt_options    = NAND_USE_FLASH_BBT,
+       .bbt_options    = NAND_BBT_USE_FLASH,
        .ecc_bits       = 1,
 };
 
index 2c506f905cb81b1d80cd506e3efc96039c3d3ced..1cf555aef896c39342bd7306c09cfa1358451fe6 100644 (file)
@@ -76,7 +76,7 @@ struct davinci_nand_pdata {           /* platform_data */
 
        /* e.g. NAND_BUSWIDTH_16 */
        unsigned                options;
-       /* e.g. NAND_USE_FLASH_BBT */
+       /* e.g. NAND_BBT_USE_FLASH */
        unsigned                bbt_options;
 
        /* Main and mirror bbt descriptor overrides */
index e5ca57ce6e50692daabe941d5721194b8de45497..8ae53015eeb882a540d5bae29199baac0b9dfa40 100644 (file)
@@ -275,7 +275,7 @@ static struct platform_nand_data ts78xx_ts_nand_data = {
                .partitions             = ts78xx_ts_nand_parts,
                .nr_partitions          = ARRAY_SIZE(ts78xx_ts_nand_parts),
                .chip_delay             = 15,
-               .bbt_options            = NAND_USE_FLASH_BBT,
+               .bbt_options            = NAND_BBT_USE_FLASH,
        },
        .ctrl   = {
                /*
index fdd11c12b7590d773b7f2f2ad3252553bcd599bc..7fb52128ddc900ebfba2952654798ab04d8e5b97 100644 (file)
@@ -163,7 +163,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
        this->ecc.mode = NAND_ECC_SOFT;
 
        /* 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 */
        if (nand_scan(crisv32_mtd, 1)) {
index 3368177bdd3b5627f359d10904546cee112eab21..e03238454b0ee541e0daa556493039cedf776dbc 100644 (file)
@@ -154,7 +154,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
        this->ecc.mode = NAND_ECC_SOFT;
 
        /* 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 */
        if (nand_scan(crisv32_mtd, 1)) {
index 78d551622e11bb21798c18a39254fcf8a8403910..79a7ef2766164ca6d2b84af8c9b2790f4225b5f0 100644 (file)
@@ -583,7 +583,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
 
        if (on_flash_bbt) {
                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())
index adf934df8958d96432ec3ceaa93f44497729ebbc..2e42ec2e8ff48a285b939e7510ea91d22dd6035f 100644 (file)
@@ -172,9 +172,9 @@ static int __init autcpu12_init(void)
 
        /* 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 */
        if (nand_scan(autcpu12_mtd, 1)) {
index 974d9bc8e48ebebe134274e6ed221a6dac1123ba..e3ffc4c908e414312f4554481317d6f17103bdcb 100644 (file)
@@ -474,7 +474,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev)
 
 #if NAND_ECC_BCH
        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;
                this->badblock_pattern = &largepage_bbt;
        }
index 7dd7d844d2cf25353167d6a0a97ebd08b14abae5..d0eed498ed2bc31c21f2ff4d0a44cc8873c4ab86 100644 (file)
@@ -686,7 +686,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
        cafe->nand.chip_delay = 0;
 
        /* 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;
 
        if (skipbbt) {
index 05adedd8c20c4a68db45eaa10097283b233d139b..b35496143e74c3b27fe920797b00262fc41878d6 100644 (file)
@@ -239,7 +239,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr)
        this->ecc.correct  = nand_correct_data;
 
        /* 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;
 
        /* Scan to find existence of the device */
index 69f70195ff35c0a689f3cb83334abc5afa8bef9c..a4c82b4344baa88b947992a122a8e48705848484 100644 (file)
@@ -581,7 +581,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
        info->chip.chip_delay   = 0;
        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;
        /* options such as 16-bit widths */
        info->chip.options      = pdata->options;
index dbb6fbae7d2583cf1fcdf4380607b8fcde11c759..ee3014505af2d0946ded50f1fc53dc432a712d08 100644 (file)
@@ -1577,7 +1577,7 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
        denali->nand.bbt_md = &bbt_mirror_descr;
 
        /* skip the scan for now until we have OOB read and write support */
-       denali->nand.bbt_options |= NAND_USE_FLASH_BBT;
+       denali->nand.bbt_options |= NAND_BBT_USE_FLASH;
        denali->nand.options |= NAND_SKIP_BBTSCAN;
        denali->nand.ecc.mode = NAND_ECC_HW_SYNDROME;
 
index f70bc73e7948043ecf72e00fd8a286169901fac8..b657d7f9b05cc091d8385facf4a5c1b6812d7a96 100644 (file)
@@ -1652,7 +1652,7 @@ static int __init doc_probe(unsigned long physadr)
        nand->ecc.mode          = NAND_ECC_HW_SYNDROME;
        nand->ecc.size          = 512;
        nand->ecc.bytes         = 6;
-       nand->bbt_options       = NAND_USE_FLASH_BBT;
+       nand->bbt_options       = NAND_BBT_USE_FLASH;
 
        doc->physadr            = physadr;
        doc->virtadr            = virtadr;
index bff4791d73c3bc27c5ce129e357ba1ce729f2751..d4ea5fe013b7f3778ab6219d0153242190996f26 100644 (file)
@@ -792,7 +792,7 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv)
 
        /* set up nand options */
        chip->options = NAND_NO_READRDY | NAND_NO_AUTOINCR;
-       chip->bbt_options = NAND_USE_FLASH_BBT;
+       chip->bbt_options = NAND_BBT_USE_FLASH;
 
        chip->controller = &elbc_fcm_ctrl->controller;
        chip->priv = priv;
index 0ac64b54bd67dcb88acd03823356d7a8373e9c97..2f2c35a7771e9977cd7e672e8d1f7d54f5ca4cb6 100644 (file)
@@ -736,7 +736,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op)
        chip->verify_buf = mpc5121_nfc_verify_buf;
        chip->select_chip = mpc5121_nfc_select_chip;
        chip->options = NAND_NO_AUTOINCR;
-       chip->bbt_options = NAND_USE_FLASH_BBT;
+       chip->bbt_options = NAND_BBT_USE_FLASH;
        chip->ecc.mode = NAND_ECC_SOFT;
 
        /* Support external chip-select logic on ADS5121 board */
index ed68fde3d1be0ebd1f9b98036390479b94e729d4..ca42c8f335b38a3b87000f79af6bc5c87bae54dd 100644 (file)
@@ -1179,7 +1179,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
                this->bbt_td = &bbt_main_descr;
                this->bbt_md = &bbt_mirror_descr;
                /* update flash based bbt */
-               this->bbt_options |= NAND_USE_FLASH_BBT;
+               this->bbt_options |= NAND_BBT_USE_FLASH;
        }
 
        init_completion(&host->op_completion);
index d39dffe71de4160fbe0a139912c9d7e92bd06382..422e7872d6db9f275d40cd2f8d07db2ffb10d4a0 100644 (file)
@@ -405,7 +405,7 @@ static 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 (chip->bbt_options & NAND_USE_FLASH_BBT)
+       if (chip->bbt_options & NAND_BBT_USE_FLASH)
                ret = nand_update_bbt(mtd, ofs);
        else {
                nand_get_device(chip, mtd, FL_WRITING);
index 66f93e2ac16b7217facf44378b4d00e19fb99ce9..dfea9fd1d61cb04cca6a08bbacc45de052dbcf94 100644 (file)
@@ -14,7 +14,7 @@
  *
  * When nand_scan_bbt is called, then it tries to find the bad block table
  * depending on the options in the BBT descriptor(s). If no flash based BBT
- * (NAND_USE_FLASH_BBT) is specified then the device is scanned for factory
+ * (NAND_BBT_USE_FLASH) is specified then the device is scanned for factory
  * marked good / bad blocks. This information is used to create a memory BBT.
  * Once a new bad block is discovered then the "factory" information is updated
  * on the device.
@@ -36,7 +36,7 @@
  * The table is marked in the OOB area with an ident pattern and a version
  * number which indicates which of both tables is more up to date. If the NAND
  * controller needs the complete OOB area for the ECC information then the
- * option NAND_BBT_NO_OOB should be used (along with NAND_USE_FLASH_BBT, of
+ * option NAND_BBT_NO_OOB should be used (along with NAND_BBT_USE_FLASH, of
  * course): it moves the ident pattern and the version byte into the data area
  * and the OOB area will remain untouched.
  *
@@ -1083,14 +1083,14 @@ static void verify_bbt_descr(struct mtd_info *mtd, struct nand_bbt_descr *bd)
        bits = bd->options & NAND_BBT_NRBITS_MSK;
 
        BUG_ON((this->bbt_options & NAND_BBT_NO_OOB) &&
-                       !(this->bbt_options & NAND_USE_FLASH_BBT));
+                       !(this->bbt_options & NAND_BBT_USE_FLASH));
        BUG_ON(!bits);
 
        if (bd->options & NAND_BBT_VERSION)
                pattern_len++;
 
        if (bd->options & NAND_BBT_NO_OOB) {
-               BUG_ON(!(this->bbt_options & NAND_USE_FLASH_BBT));
+               BUG_ON(!(this->bbt_options & NAND_BBT_USE_FLASH));
                BUG_ON(!(this->bbt_options & NAND_BBT_NO_OOB));
                BUG_ON(bd->offs);
                if (bd->options & NAND_BBT_VERSION)
@@ -1357,12 +1357,12 @@ int nand_default_bbt(struct mtd_info *mtd)
                        this->bbt_td = &bbt_main_descr;
                        this->bbt_md = &bbt_mirror_descr;
                }
-               this->bbt_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->bbt_options & NAND_USE_FLASH_BBT) {
+       if (this->bbt_options & NAND_BBT_USE_FLASH) {
                /* Use the default pattern descriptors */
                if (!this->bbt_td) {
                        if (this->bbt_options & NAND_BBT_NO_OOB) {
index 1856c42c62c4e5c14052f6508e2b077e8f948fbc..34c03be7730105c3a26867637700f8c0ade83219 100644 (file)
@@ -2275,7 +2275,7 @@ static int __init ns_init_module(void)
        case 2:
                 chip->bbt_options |= NAND_BBT_NO_OOB;
        case 1:
-                chip->bbt_options |= NAND_USE_FLASH_BBT;
+                chip->bbt_options |= NAND_BBT_USE_FLASH;
        case 0:
                break;
        default:
index 1c17f091e16b71a5792b01b1e40aa880f6f72324..a97264ececdbe2278edf20b11a2d072bd38feba4 100644 (file)
@@ -156,7 +156,7 @@ static int __devinit pasemi_nand_probe(struct platform_device *ofdev)
 
        /* Enable the following for a flash based bad block table */
        chip->options = NAND_NO_AUTOINCR;
-       chip->bbt_options = NAND_USE_FLASH_BBT;
+       chip->bbt_options = NAND_BBT_USE_FLASH;
 
        /* Scan to find existence of the device */
        if (nand_scan(pasemi_nand_mtd, 1)) {
index 370516c3f7c74ebb0a9a784ebfb9de2adbccdeb2..ec280798e221e3fd28d3619028cfd6ecf789d3a3 100644 (file)
@@ -881,7 +881,7 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
         * let the kernel fish out the BBT from the NAND, and also skip the
         * full NAND scan that can take 1/2s or so. Little things... */
        if (set->flash_bbt) {
-               chip->bbt_options |= NAND_USE_FLASH_BBT;
+               chip->bbt_options |= NAND_BBT_USE_FLASH;
                chip->options |= NAND_SKIP_BBTSCAN;
        }
 }
index 7929514781eafaa8c0dc514cec6f3448962b510c..ff18c08505199f4a6ef07982019c327221b8d950 100644 (file)
@@ -104,7 +104,7 @@ struct nand_bbt_descr {
  * 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_USE_FLASH_BBT     0x00040000
+#define NAND_BBT_USE_FLASH     0x00040000
 /* Do not store flash based bad block table in OOB area; store it in-band */
 #define NAND_BBT_NO_OOB                0x00080000