diff options
| author | Brian Norris <computersforpeace@gmail.com> | 2012-05-23 02:50:00 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-07-06 13:17:05 -0400 |
| commit | 1696e6bc2ae83734e64e206ac99766ea19e9a14e (patch) | |
| tree | 7abaa256687acd2495ba4c88c65532c2ab7df624 | |
| parent | 63d99c0e89039e1509209d36ee17fc374fd112c9 (diff) | |
mtd: nand: kill NAND_NO_READRDY
According to its documentation, the NAND_NO_READRDY option is always used
when autoincrement is not supported. Autoincrement support was recently
dropped, so we can drop this options as well (defaulting to "no read ready
check").
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>
| -rw-r--r-- | drivers/mtd/nand/fsl_elbc_nand.c | 1 | ||||
| -rw-r--r-- | drivers/mtd/nand/fsl_ifc_nand.c | 1 | ||||
| -rw-r--r-- | drivers/mtd/nand/nand_base.c | 17 | ||||
| -rw-r--r-- | drivers/mtd/nand/nand_ids.c | 4 | ||||
| -rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 1 | ||||
| -rw-r--r-- | include/linux/mtd/nand.h | 6 |
6 files changed, 2 insertions, 28 deletions
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 78429380611..1d8d111fa3a 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
| @@ -805,7 +805,6 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv) | |||
| 805 | chip->bbt_md = &bbt_mirror_descr; | 805 | chip->bbt_md = &bbt_mirror_descr; |
| 806 | 806 | ||
| 807 | /* set up nand options */ | 807 | /* set up nand options */ |
| 808 | chip->options = NAND_NO_READRDY; | ||
| 809 | chip->bbt_options = NAND_BBT_USE_FLASH; | 808 | chip->bbt_options = NAND_BBT_USE_FLASH; |
| 810 | 809 | ||
| 811 | chip->controller = &elbc_fcm_ctrl->controller; | 810 | chip->controller = &elbc_fcm_ctrl->controller; |
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index 9602c1b7e27..c5d7f382759 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c | |||
| @@ -805,7 +805,6 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv) | |||
| 805 | out_be32(&ifc->ifc_nand.ncfgr, 0x0); | 805 | out_be32(&ifc->ifc_nand.ncfgr, 0x0); |
| 806 | 806 | ||
| 807 | /* set up nand options */ | 807 | /* set up nand options */ |
| 808 | chip->options = NAND_NO_READRDY; | ||
| 809 | chip->bbt_options = NAND_BBT_USE_FLASH; | 808 | chip->bbt_options = NAND_BBT_USE_FLASH; |
| 810 | 809 | ||
| 811 | 810 | ||
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index a11253a0fca..0a8724e657d 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
| @@ -1565,14 +1565,6 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from, | |||
| 1565 | oobreadlen -= toread; | 1565 | oobreadlen -= toread; |
| 1566 | } | 1566 | } |
| 1567 | } | 1567 | } |
| 1568 | |||
| 1569 | if (!(chip->options & NAND_NO_READRDY)) { | ||
| 1570 | /* Apply delay or wait for ready/busy pin */ | ||
| 1571 | if (!chip->dev_ready) | ||
| 1572 | udelay(chip->chip_delay); | ||
| 1573 | else | ||
| 1574 | nand_wait_ready(mtd); | ||
| 1575 | } | ||
| 1576 | } else { | 1568 | } else { |
| 1577 | memcpy(buf, chip->buffers->databuf + col, bytes); | 1569 | memcpy(buf, chip->buffers->databuf + col, bytes); |
| 1578 | buf += bytes; | 1570 | buf += bytes; |
| @@ -1837,14 +1829,6 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from, | |||
| 1837 | len = min(len, readlen); | 1829 | len = min(len, readlen); |
| 1838 | buf = nand_transfer_oob(chip, buf, ops, len); | 1830 | buf = nand_transfer_oob(chip, buf, ops, len); |
| 1839 | 1831 | ||
| 1840 | if (!(chip->options & NAND_NO_READRDY)) { | ||
| 1841 | /* Apply delay or wait for ready/busy pin */ | ||
| 1842 | if (!chip->dev_ready) | ||
| 1843 | udelay(chip->chip_delay); | ||
| 1844 | else | ||
| 1845 | nand_wait_ready(mtd); | ||
| 1846 | } | ||
| 1847 | |||
| 1848 | readlen -= len; | 1832 | readlen -= len; |
| 1849 | if (!readlen) | 1833 | if (!readlen) |
| 1850 | break; | 1834 | break; |
| @@ -2915,7 +2899,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, | |||
| 2915 | *busw = NAND_BUSWIDTH_16; | 2899 | *busw = NAND_BUSWIDTH_16; |
| 2916 | 2900 | ||
| 2917 | chip->options &= ~NAND_CHIPOPTIONS_MSK; | 2901 | chip->options &= ~NAND_CHIPOPTIONS_MSK; |
| 2918 | chip->options |= NAND_NO_READRDY & NAND_CHIPOPTIONS_MSK; | ||
| 2919 | 2902 | ||
| 2920 | pr_info("ONFI flash detected\n"); | 2903 | pr_info("ONFI flash detected\n"); |
| 2921 | return 1; | 2904 | return 1; |
diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c index 509a9f6706f..e04c675bf60 100644 --- a/drivers/mtd/nand/nand_ids.c +++ b/drivers/mtd/nand/nand_ids.c | |||
| @@ -70,7 +70,7 @@ struct nand_flash_dev nand_flash_ids[] = { | |||
| 70 | * These are the new chips with large page size. The pagesize and the | 70 | * These are the new chips with large page size. The pagesize and the |
| 71 | * erasesize is determined from the extended id bytes | 71 | * erasesize is determined from the extended id bytes |
| 72 | */ | 72 | */ |
| 73 | #define LP_OPTIONS (NAND_SAMSUNG_LP_OPTIONS | NAND_NO_READRDY) | 73 | #define LP_OPTIONS NAND_SAMSUNG_LP_OPTIONS |
| 74 | #define LP_OPTIONS16 (LP_OPTIONS | NAND_BUSWIDTH_16) | 74 | #define LP_OPTIONS16 (LP_OPTIONS | NAND_BUSWIDTH_16) |
| 75 | 75 | ||
| 76 | /* 512 Megabit */ | 76 | /* 512 Megabit */ |
| @@ -157,7 +157,7 @@ struct nand_flash_dev nand_flash_ids[] = { | |||
| 157 | * writes possible, but not implemented now | 157 | * writes possible, but not implemented now |
| 158 | */ | 158 | */ |
| 159 | {"AND 128MiB 3,3V 8-bit", 0x01, 2048, 128, 0x4000, | 159 | {"AND 128MiB 3,3V 8-bit", 0x01, 2048, 128, 0x4000, |
| 160 | NAND_IS_AND | NAND_NO_READRDY | NAND_4PAGE_ARRAY | BBT_AUTO_REFRESH}, | 160 | NAND_IS_AND | NAND_4PAGE_ARRAY | BBT_AUTO_REFRESH}, |
| 161 | 161 | ||
| 162 | {NULL,} | 162 | {NULL,} |
| 163 | }; | 163 | }; |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 252aaefcacf..afc4681f44d 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
| @@ -1005,7 +1005,6 @@ KEEP_CONFIG: | |||
| 1005 | chip->ecc.size = host->page_size; | 1005 | chip->ecc.size = host->page_size; |
| 1006 | chip->ecc.strength = 1; | 1006 | chip->ecc.strength = 1; |
| 1007 | 1007 | ||
| 1008 | chip->options |= NAND_NO_READRDY; | ||
| 1009 | if (host->reg_ndcr & NDCR_DWIDTH_M) | 1008 | if (host->reg_ndcr & NDCR_DWIDTH_M) |
| 1010 | chip->options |= NAND_BUSWIDTH_16; | 1009 | chip->options |= NAND_BUSWIDTH_16; |
| 1011 | 1010 | ||
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 53dcf4973c1..a81ac89a695 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -185,12 +185,6 @@ typedef enum { | |||
| 185 | * This happens with the Renesas AG-AND chips, possibly others. | 185 | * This happens with the Renesas AG-AND chips, possibly others. |
| 186 | */ | 186 | */ |
| 187 | #define BBT_AUTO_REFRESH 0x00000080 | 187 | #define BBT_AUTO_REFRESH 0x00000080 |
| 188 | /* | ||
| 189 | * Chip does not require ready check on read. True | ||
| 190 | * for all large page devices, as they do not support | ||
| 191 | * autoincrement. | ||
| 192 | */ | ||
| 193 | #define NAND_NO_READRDY 0x00000100 | ||
| 194 | /* Chip does not allow subpage writes */ | 188 | /* Chip does not allow subpage writes */ |
| 195 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 | 189 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 |
| 196 | 190 | ||
