linux-stable/drivers/mtd/nand
Hauke Mehrtens b80ea54e1e mtd: rawnand: mtk: Fix WAITRDY break condition and timeout
[ Upstream commit 2fb164f0ce ]

This fixes NAND_OP_WAITRDY_INSTR operation in the driver. Without this
change the driver waits till the system is busy, but we should wait till
the busy flag is cleared. The readl_poll_timeout() function gets a break
condition, not a wait condition.

In addition fix the timeout. The timeout_ms is given in ms, but the
readl_poll_timeout() function takes the timeout in us. Multiple the
given timeout by 1000 to convert it.

Without this change, the driver does not work at all, it doesn't even
identify the NAND chip.

Fixes: 5197360f9e ("mtd: rawnand: mtk: Convert the driver to exec_op()")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210309000107.1368404-1-hauke@hauke-m.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-21 13:00:50 +02:00
..
onenand mtd: onenand: simplify the return expression of onenand_transfer_auto_oob 2020-09-30 16:44:17 +02:00
raw mtd: rawnand: mtk: Fix WAITRDY break condition and timeout 2021-04-21 13:00:50 +02:00
spi Revert "mtd: spinand: Fix OOB read" 2021-01-09 13:46:22 +01:00
bbt.c mtd: nand: Fix memory allocation in nanddev_bbt_init() 2018-11-28 15:41:50 +01:00
core.c mtd: nand: Add max_bad_eraseblocks_per_lun info to memorg 2019-04-08 10:21:08 +02:00
ecc.c mtd: nand: Introduce the ECC engine framework 2020-09-02 09:28:15 +02:00
Kconfig mtd: nand: Introduce the ECC engine framework 2020-09-02 09:28:15 +02:00
Makefile mtd: nand: Introduce the ECC engine framework 2020-09-02 09:28:15 +02:00