]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
mtd: nand: kill NAND_NO_AUTOINCR option
authorBrian Norris <computersforpeace@gmail.com>
Wed, 2 May 2012 00:12:55 +0000 (17:12 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 14 May 2012 04:15:38 +0000 (23:15 -0500)
No drivers use auto-increment NAND, so kill the NO_AUTOINCR option entirely.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
20 files changed:
Documentation/DocBook/mtdnand.tmpl
arch/arm/mach-ep93xx/snappercl15.c
arch/arm/mach-ixp4xx/ixdp425-setup.c
arch/arm/mach-nomadik/board-nhk8815.c
arch/mips/rb532/devices.c
drivers/mtd/nand/au1550nd.c
drivers/mtd/nand/cafe_nand.c
drivers/mtd/nand/cs553x_nand.c
drivers/mtd/nand/docg4.c
drivers/mtd/nand/fsl_elbc_nand.c
drivers/mtd/nand/fsl_ifc_nand.c
drivers/mtd/nand/h1910.c
drivers/mtd/nand/mpc5121_nfc.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_ids.c
drivers/mtd/nand/pasemi_nand.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/mtd/nand/sh_flctl.c
drivers/mtd/nand/sm_common.c
include/linux/mtd/nand.h

index 0c674be0d3c6de3d05e1903f6fac4beecff51133..e0aedb7a782718c445d48f8f42ee9e14a3d5a33a 100644 (file)
@@ -1119,8 +1119,6 @@ in this page</entry>
                These constants are defined in nand.h. They are ored together to describe
                the chip functionality.
                <programlisting>
-/* Chip can not auto increment pages */
-#define NAND_NO_AUTOINCR       0x00000001
 /* Buswitdh is 16 bit */
 #define NAND_BUSWIDTH_16       0x00000002
 /* Device supports partial programming without padding */
index 5df9092f1fccffb5ca564d02e5f0d63e4414ebe8..376b8f5ecfa30eb9e4866fbc8686908ff8041a2f 100644 (file)
@@ -100,7 +100,6 @@ static struct platform_nand_data snappercl15_nand_data = {
                .nr_chips               = 1,
                .partitions             = snappercl15_nand_parts,
                .nr_partitions          = ARRAY_SIZE(snappercl15_nand_parts),
-               .options                = NAND_NO_AUTOINCR,
                .chip_delay             = 25,
        },
        .ctrl = {
index fccfc73e69f10f08d1ebe11392796398d79f383e..108a9d3f382da148ff3b6cf281440ab4a302d1c4 100644 (file)
@@ -98,7 +98,6 @@ static struct platform_nand_data ixdp425_flash_nand_data = {
        .chip = {
                .nr_chips               = 1,
                .chip_delay             = 30,
-               .options                = NAND_NO_AUTOINCR,
                .partitions             = ixdp425_partitions,
                .nr_partitions          = ARRAY_SIZE(ixdp425_partitions),
        },
index 58cacafcf6628758a27623abb8f8be1b1b240317..2e8d3e176bc70b7216b5b8aa818b648ae63ebee0 100644 (file)
@@ -111,7 +111,7 @@ static struct nomadik_nand_platform_data nhk8815_nand_data = {
        .parts          = nhk8815_partitions,
        .nparts         = ARRAY_SIZE(nhk8815_partitions),
        .options        = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING \
-                       | NAND_NO_READRDY | NAND_NO_AUTOINCR,
+                       | NAND_NO_READRDY,
        .init           = nhk8815_nand_init,
 };
 
index a969eb8266340326c17509cfbba6522498f0d6cd..08c4f8e03ffebac6d39bb7f8a3111f5a0fe5deff 100644 (file)
@@ -292,7 +292,6 @@ static void __init rb532_nand_setup(void)
        rb532_nand_data.chip.nr_partitions = ARRAY_SIZE(rb532_partition_info);
        rb532_nand_data.chip.partitions = rb532_partition_info;
        rb532_nand_data.chip.chip_delay = NAND_CHIP_DELAY;
-       rb532_nand_data.chip.options = NAND_NO_AUTOINCR;
 }
 
 
index 73abbc3e093eced219347f93f9fefc5b31c2bd15..9f609d2dcf62d3dc993358e4de817de00d154267 100644 (file)
@@ -508,8 +508,6 @@ static int __devinit au1550nd_probe(struct platform_device *pdev)
        this->chip_delay = 30;
        this->ecc.mode = NAND_ECC_SOFT;
 
-       this->options = NAND_NO_AUTOINCR;
-
        if (pd->devwidth)
                this->options |= NAND_BUSWIDTH_16;
 
index 886ff3a064c296479fd64dd1462e93551fca81f6..75fb77b96efbfe69a529b821c56047c013efd2a5 100644 (file)
@@ -687,7 +687,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
 
        /* Enable the following for a flash based bad block table */
        cafe->nand.bbt_options = NAND_BBT_USE_FLASH;
-       cafe->nand.options = NAND_NO_AUTOINCR | NAND_OWN_BUFFERS;
+       cafe->nand.options = NAND_OWN_BUFFERS;
 
        if (skipbbt) {
                cafe->nand.options |= NAND_SKIP_BBTSCAN;
index 821c34c6250021246dfdb7ef97a44e497a05726c..adb6c3ef37fb0d8a645177f1c8efaf6b098bde8e 100644 (file)
@@ -240,7 +240,6 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr)
 
        /* Enable the following for a flash based bad block table */
        this->bbt_options = NAND_BBT_USE_FLASH;
-       this->options = NAND_NO_AUTOINCR;
 
        /* Scan to find existence of the device */
        if (nand_scan(new_mtd, 1)) {
index 8e7da0170a2b70867418bc1bcd218d583c5d7873..1540de2ad39aa404d6fe4f25cc2e7f22e96387e1 100644 (file)
@@ -1193,8 +1193,7 @@ static void __init init_mtd_structs(struct mtd_info *mtd)
        nand->ecc.prepad = 8;
        nand->ecc.bytes = 8;
        nand->ecc.strength = DOCG4_T;
-       nand->options =
-               NAND_BUSWIDTH_16 | NAND_NO_SUBPAGE_WRITE | NAND_NO_AUTOINCR;
+       nand->options = NAND_BUSWIDTH_16 | NAND_NO_SUBPAGE_WRITE;
        nand->IO_ADDR_R = nand->IO_ADDR_W = doc->virtadr + DOC_IOSPACE_DATA;
        nand->controller = &nand->hwcontrol;
        spin_lock_init(&nand->controller->lock);
index 8638b5e734cc9aa8290f817f1559d4b3f185997e..4d995875d3663b599a03bc5d4125b49d90e0d106 100644 (file)
@@ -807,7 +807,7 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv)
        chip->bbt_md = &bbt_mirror_descr;
 
        /* set up nand options */
-       chip->options = NAND_NO_READRDY | NAND_NO_AUTOINCR;
+       chip->options = NAND_NO_READRDY;
        chip->bbt_options = NAND_BBT_USE_FLASH;
 
        chip->controller = &elbc_fcm_ctrl->controller;
index 0adde96704184928987ac6c85f782954a9f29a5c..dffd2fa353ae7d5325e9699178e41768e809383e 100644 (file)
@@ -806,7 +806,7 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
        out_be32(&ifc->ifc_nand.ncfgr, 0x0);
 
        /* set up nand options */
-       chip->options = NAND_NO_READRDY | NAND_NO_AUTOINCR;
+       chip->options = NAND_NO_READRDY;
        chip->bbt_options = NAND_BBT_USE_FLASH;
 
 
index 11e487813428735082ce544ace9d150345ef68d1..85e55a5eb2ff499fae38f0d82f557672b0b21b5e 100644 (file)
@@ -124,7 +124,6 @@ static int __init h1910_init(void)
        /* 15 us command delay time */
        this->chip_delay = 50;
        this->ecc.mode = NAND_ECC_SOFT;
-       this->options = NAND_NO_AUTOINCR;
 
        /* Scan to find existence of the device */
        if (nand_scan(h1910_nand_mtd, 1)) {
index c240cf1af96166f8c2431e029dc90064a443ecf4..c259c24d7986034f3a2d14e02d5c06fb9a19a323 100644 (file)
@@ -734,7 +734,6 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op)
        chip->write_buf = mpc5121_nfc_write_buf;
        chip->verify_buf = mpc5121_nfc_verify_buf;
        chip->select_chip = mpc5121_nfc_select_chip;
-       chip->options = NAND_NO_AUTOINCR;
        chip->bbt_options = NAND_BBT_USE_FLASH;
        chip->ecc.mode = NAND_ECC_SOFT;
 
index 6246b0fc2fcd656f52c46a9a8d6ec2b2ffb29f1f..5ec4d2c01b871c72563ae00ee0751423b4f3e221 100644 (file)
@@ -2895,8 +2895,7 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
                *busw = NAND_BUSWIDTH_16;
 
        chip->options &= ~NAND_CHIPOPTIONS_MSK;
-       chip->options |= (NAND_NO_READRDY |
-                       NAND_NO_AUTOINCR) & NAND_CHIPOPTIONS_MSK;
+       chip->options |= NAND_NO_READRDY & NAND_CHIPOPTIONS_MSK;
 
        pr_info("ONFI flash detected\n");
        return 1;
@@ -3073,11 +3072,6 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
                chip->options &= ~NAND_SAMSUNG_LP_OPTIONS;
 ident_done:
 
-       /*
-        * Set chip as a default. Board drivers can override it, if necessary.
-        */
-       chip->options |= NAND_NO_AUTOINCR;
-
        /* Try to identify manufacturer */
        for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_idx++) {
                if (nand_manuf_ids[maf_idx].id == *maf_id)
index af4fe8ca7b5ef7fbdfb25bb2553d8af4f61f8d29..621b70b7a159099ffc3060bdf2651a38dc2dae43 100644 (file)
@@ -70,7 +70,7 @@ struct nand_flash_dev nand_flash_ids[] = {
         * These are the new chips with large page size. The pagesize and the
         * erasesize is determined from the extended id bytes
         */
-#define LP_OPTIONS (NAND_SAMSUNG_LP_OPTIONS | NAND_NO_READRDY | NAND_NO_AUTOINCR)
+#define LP_OPTIONS (NAND_SAMSUNG_LP_OPTIONS | NAND_NO_READRDY)
 #define LP_OPTIONS16 (LP_OPTIONS | NAND_BUSWIDTH_16)
 
        /* 512 Megabit */
@@ -157,9 +157,7 @@ struct nand_flash_dev nand_flash_ids[] = {
         * writes possible, but not implemented now
         */
        {"AND 128MiB 3,3V 8-bit",       0x01, 2048, 128, 0x4000,
-        NAND_IS_AND | NAND_NO_AUTOINCR |NAND_NO_READRDY | NAND_4PAGE_ARRAY |
-        BBT_AUTO_REFRESH
-       },
+        NAND_IS_AND | NAND_NO_READRDY | NAND_4PAGE_ARRAY | BBT_AUTO_REFRESH},
 
        {NULL,}
 };
index 974dbf8251c928842fe528c15777e4cd12efdaa8..1440e51cedccc877108a3922046a4b56fbac40ca 100644 (file)
@@ -155,7 +155,6 @@ static int __devinit pasemi_nand_probe(struct platform_device *ofdev)
        chip->ecc.mode = NAND_ECC_SOFT;
 
        /* Enable the following for a flash based bad block table */
-       chip->options = NAND_NO_AUTOINCR;
        chip->bbt_options = NAND_BBT_USE_FLASH;
 
        /* Scan to find existence of the device */
index def50caa6f84b259fd5ed23e702efcd5977317cb..36a32a0d3b9f96475d1b497a70c434eff8e56e81 100644 (file)
@@ -1004,7 +1004,6 @@ KEEP_CONFIG:
        chip->ecc.size = host->page_size;
        chip->ecc.strength = 1;
 
-       chip->options = NAND_NO_AUTOINCR;
        chip->options |= NAND_NO_READRDY;
        if (host->reg_ndcr & NDCR_DWIDTH_M)
                chip->options |= NAND_BUSWIDTH_16;
index 4ea3e20169bafbd2a649fb52ba4095a18a258e8b..3f0788fad66fba0b4ad8894bca3ed5027dfa6fb7 100644 (file)
@@ -881,8 +881,6 @@ static int __devinit flctl_probe(struct platform_device *pdev)
        flctl->hwecc = pdata->has_hwecc;
        flctl->holden = pdata->use_holden;
 
-       nand->options = NAND_NO_AUTOINCR;
-
        /* Set address of hardware control function */
        /* 20 us command delay time */
        nand->chip_delay = 20;
index 774c3c26671379a30ef8c3f4e0aec1c57ee3efec..082bcdcd6bcfa3f460e26b68edc183b56aba5947 100644 (file)
@@ -94,17 +94,16 @@ static struct nand_flash_dev nand_smartmedia_flash_ids[] = {
        {NULL,}
 };
 
-#define XD_TYPEM       (NAND_NO_AUTOINCR | NAND_BROKEN_XD)
 static struct nand_flash_dev nand_xd_flash_ids[] = {
 
        {"xD 16MiB 3,3V",    0x73, 512, 16, 0x4000, 0},
        {"xD 32MiB 3,3V",    0x75, 512, 32, 0x4000, 0},
        {"xD 64MiB 3,3V",    0x76, 512, 64, 0x4000, 0},
        {"xD 128MiB 3,3V",   0x79, 512, 128, 0x4000, 0},
-       {"xD 256MiB 3,3V",   0x71, 512, 256, 0x4000, XD_TYPEM},
-       {"xD 512MiB 3,3V",   0xdc, 512, 512, 0x4000, XD_TYPEM},
-       {"xD 1GiB 3,3V",     0xd3, 512, 1024, 0x4000, XD_TYPEM},
-       {"xD 2GiB 3,3V",     0xd5, 512, 2048, 0x4000, XD_TYPEM},
+       {"xD 256MiB 3,3V",   0x71, 512, 256, 0x4000, NAND_BROKEN_XD},
+       {"xD 512MiB 3,3V",   0xdc, 512, 512, 0x4000, NAND_BROKEN_XD},
+       {"xD 1GiB 3,3V",     0xd3, 512, 1024, 0x4000, NAND_BROKEN_XD},
+       {"xD 2GiB 3,3V",     0xd5, 512, 2048, 0x4000, NAND_BROKEN_XD},
        {NULL,}
 };
 
index 2829e8be3a620771ff14c15e635d7fbcfd4fe5d6..627f0c575ac4119e50f2e57022e4c4ac54f19cfd 100644 (file)
@@ -161,8 +161,6 @@ typedef enum {
  * Option constants for bizarre disfunctionality and real
  * features.
  */
-/* Chip can not auto increment pages */
-#define NAND_NO_AUTOINCR       0x00000001
 /* Buswidth is 16 bit */
 #define NAND_BUSWIDTH_16       0x00000002
 /* Device supports partial programming without padding */
@@ -207,7 +205,6 @@ typedef enum {
        (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK)
 
 /* Macros to identify the above */
-#define NAND_CANAUTOINCR(chip) (!(chip->options & NAND_NO_AUTOINCR))
 #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING))
 #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
 #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK))
@@ -216,7 +213,7 @@ typedef enum {
                                        && (chip->page_shift > 9))
 
 /* Mask to zero out the chip options, which come from the id table */
-#define NAND_CHIPOPTIONS_MSK   (0x0000ffff & ~NAND_NO_AUTOINCR)
+#define NAND_CHIPOPTIONS_MSK   0x0000ffff
 
 /* Non chip related options */
 /* This option skips the bbt scan during initialization. */