]> git.baikalelectronics.ru Git - kernel.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)
committerBrian Norris <computersforpeace@gmail.com>
Sat, 28 Feb 2015 08:53:50 +0000 (00:53 -0800)
commit4c27709f2d50f548fbbf76fa09b9c466dd987544
treef9540167a8e4be82dceaa5c486e11a3cf1a73ac6
parent9cbe621030a9cce16d27329dac74fd4b1c1d9412
mtd: nand: pxa3xx: Fix PIO FIFO draining

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>
drivers/mtd/nand/pxa3xx_nand.c