]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: nand: pxa3xx: Fix PIO FIFO draining
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 18 Feb 2015 10:32:07 +0000 (11:32 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 28 Mar 2015 13:50:41 +0000 (09:50 -0400)
commit8c07b3abce1d575c41c41df623486fed33703fd8
tree09f96507494ca367b7aee326120c25f64a1504e4
parent79eb59a64b923ca914cefe05ad149957514c8c89
mtd: nand: pxa3xx: Fix PIO FIFO draining

[ Upstream commit 8dad0386b97c4bd6edd56752ca7f2e735fe5beb4 ]

The NDDB register holds the data that are needed by the read and write
commands.

However, during a read PIO access, the datasheet specifies that after each 32
bytes read in that register, when BCH is enabled, we have to make sure that the
RDDREQ bit is set in the NDSR register.

This fixes an issue that was seen on the Armada 385, and presumably other mvebu
SoCs, when a read on a newly erased page would end up in the driver reporting a
timeout from the NAND.

Cc: <stable@vger.kernel.org> # v3.14
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/mtd/nand/pxa3xx_nand.c