Skip to content

Commit 1696e6b

Browse files
computersforpeaceDavid Woodhouse
authored andcommitted
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>
1 parent 63d99c0 commit 1696e6b

6 files changed

Lines changed: 2 additions & 28 deletions

File tree

‎drivers/mtd/nand/fsl_elbc_nand.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,6 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv)
805805
chip->bbt_md = &bbt_mirror_descr;
806806

807807
/* set up nand options */
808-
chip->options = NAND_NO_READRDY;
809808
chip->bbt_options = NAND_BBT_USE_FLASH;
810809

811810
chip->controller = &elbc_fcm_ctrl->controller;

‎drivers/mtd/nand/fsl_ifc_nand.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,6 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
805805
out_be32(&ifc->ifc_nand.ncfgr, 0x0);
806806

807807
/* set up nand options */
808-
chip->options = NAND_NO_READRDY;
809808
chip->bbt_options = NAND_BBT_USE_FLASH;
810809

811810

‎drivers/mtd/nand/nand_base.c‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,14 +1565,6 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
15651565
oobreadlen -= toread;
15661566
}
15671567
}
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-
}
15761568
} else {
15771569
memcpy(buf, chip->buffers->databuf + col, bytes);
15781570
buf += bytes;
@@ -1837,14 +1829,6 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
18371829
len = min(len, readlen);
18381830
buf = nand_transfer_oob(chip, buf, ops, len);
18391831

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-
18481832
readlen -= len;
18491833
if (!readlen)
18501834
break;
@@ -2915,7 +2899,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
29152899
*busw = NAND_BUSWIDTH_16;
29162900

29172901
chip->options &= ~NAND_CHIPOPTIONS_MSK;
2918-
chip->options |= NAND_NO_READRDY & NAND_CHIPOPTIONS_MSK;
29192902

29202903
pr_info("ONFI flash detected\n");
29212904
return 1;

‎drivers/mtd/nand/nand_ids.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ struct nand_flash_dev nand_flash_ids[] = {
7070
* These are the new chips with large page size. The pagesize and the
7171
* erasesize is determined from the extended id bytes
7272
*/
73-
#define LP_OPTIONS (NAND_SAMSUNG_LP_OPTIONS | NAND_NO_READRDY)
73+
#define LP_OPTIONS NAND_SAMSUNG_LP_OPTIONS
7474
#define LP_OPTIONS16 (LP_OPTIONS | NAND_BUSWIDTH_16)
7575

7676
/* 512 Megabit */
@@ -157,7 +157,7 @@ struct nand_flash_dev nand_flash_ids[] = {
157157
* writes possible, but not implemented now
158158
*/
159159
{"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},
161161

162162
{NULL,}
163163
};

‎drivers/mtd/nand/pxa3xx_nand.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,6 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd)
10051005
chip->ecc.size = host->page_size;
10061006
chip->ecc.strength = 1;
10071007

1008-
chip->options |= NAND_NO_READRDY;
10091008
if (host->reg_ndcr & NDCR_DWIDTH_M)
10101009
chip->options |= NAND_BUSWIDTH_16;
10111010

‎include/linux/mtd/nand.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,6 @@ typedef enum {
185185
* This happens with the Renesas AG-AND chips, possibly others.
186186
*/
187187
#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
194188
/* Chip does not allow subpage writes */
195189
#define NAND_NO_SUBPAGE_WRITE 0x00000200
196190

0 commit comments

Comments
 (0)