linux-stable/drivers/mtd/nand
Masahiro Yamada a2a05c2f53 mtd: rawnand: denali: remove ->dev_ready() hook
The Denali NAND IP has no way to read out the current signal level
of the R/B# pin. Instead, denali_dev_ready() checks if the R/B#
transition has already happened. (The INTR__INT_ACT interrupt is
asserted at the rising edge of the R/B# pin.) It is not a correct
way to implement the ->dev_ready() hook.

In fact, it has a drawback; in the nand_scan_ident phase, the chip
detection iterates over maxchips until it fails to find a homogeneous
chip. For the last loop, nand_reset() fails if no chip is there.

If ->dev_ready hook exists, nand_command(_lp) calls nand_wait_ready()
after NAND_CMD_RESET. However, we know denali_dev_ready() never
returns 1 unless there exists a chip that toggles R/B# in that chip
select. Then, nand_wait_ready() just ends up with wasting 400 msec,
in the end, shows the "timeout while waiting for chip to become ready"
warning.

Let's remove the mis-implemented dev_ready hook, and fallback to
sending the NAND_CMD_STATUS and nand_wait_status_ready(), which
bails out more quickly.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2018-12-07 10:38:28 +01:00
..
onenand mtd: onenand: use mtd_device_register() where applicable 2018-07-19 23:14:12 +02:00
raw mtd: rawnand: denali: remove ->dev_ready() hook 2018-12-07 10:38:28 +01:00
spi mtd: spinand: Add initial support for Toshiba TC58CVG2S0H 2018-12-07 10:38:23 +01:00
bbt.c mtd: nand: Add core infrastructure to deal with NAND devices 2018-02-16 10:10:53 +01:00
core.c mtd: nand: Fix nanddev_mtd_erase() 2018-04-22 19:59:29 +02:00
Kconfig mtd: nand: Add core infrastructure to support SPI NANDs 2018-07-18 09:24:10 +02:00
Makefile mtd: nand: Add core infrastructure to support SPI NANDs 2018-07-18 09:24:10 +02:00