linux/drivers/mtd/nand
Hauke Mehrtens 2fb164f0ce mtd: rawnand: mtk: Fix WAITRDY break condition and timeout
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
2021-03-11 12:23:11 +01:00
..
onenand SPI NOR core changes: 2020-12-16 18:48:16 +01:00
raw mtd: rawnand: mtk: Fix WAITRDY break condition and timeout 2021-03-11 12:23:11 +01:00
spi mtd: spinand: Fix MTD_OPS_AUTO_OOB requests 2021-01-14 16:44:41 +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 helpers to manage ECC engines and configurations 2020-12-10 22:37:30 +01:00
ecc-sw-bch.c mtd: nand: ecc-bch: Create the software BCH engine 2020-12-10 22:37:26 +01:00
ecc-sw-hamming.c mtd: nand: ecc-hamming: Clarify the logic around rp17 2020-12-10 22:37:31 +01:00
ecc.c mtd: spinand: Allow the case where there is no ECC engine 2020-12-10 22:37:30 +01:00
Kconfig mtd: nand: Change dependency between the NAND and ECC cores 2020-12-10 22:37:32 +01:00
Makefile mtd: nand: ecc-hamming: Move Hamming code to the generic NAND layer 2020-12-10 22:37:29 +01:00