linux_dsm_epyc7002/drivers/mtd/nand/gpmi-nand
Boris Brezillon 4c7e95b1b3 mtd: nand: gpmi: Fix subpage reads
Commit 25f815f66a ("mtd: nand: force drivers to explicitly send
READ/PROG commands") added a call to nand_read_page_op() in
gpmi_ecc_read_page(), which means this function now sends a READ0
command and place the data pointer at the beginning of the page. This
logic is breaking gpmi_ecc_read_subpage() which was calling
gpmi_ecc_read_page() and expected it to only retrieve the data without
sending the READ0 command.

Create a gpmi_ecc_read_page_data() helper which only does the data
retrieval and ECC correction steps and implement gpmi_ecc_read_page()
as a wrapper that calls nand_read_page_op()+gpmi_ecc_read_page_data().

This way, gpmi_ecc_read_subpage() can call gpmi_ecc_read_page_data()
which restores the logic we had before commit 25f815f66a ("mtd: nand:
force drivers to explicitly send READ/PROG commands").

Fixes: 25f815f66a ("mtd: nand: force drivers to explicitly send READ/PROG commands")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Acked-by: Han Xu <han.xu@nxp.com>
2018-01-25 09:14:20 +01:00
..
bch-regs.h mtd: gpmi: add gpmi support for imx6sx 2014-05-28 16:02:16 -07:00
gpmi-lib.c mtd: nand: gpmi: fix typo in comment 2017-06-10 12:09:28 +02:00
gpmi-nand.c mtd: nand: gpmi: Fix subpage reads 2018-01-25 09:14:20 +01:00
gpmi-nand.h mtd: nand: remove unnecessary extern from driver headers 2017-11-30 22:32:49 +01:00
gpmi-regs.h mtd: gpmi: decouple the chip select from the DMA channel 2013-11-06 23:33:01 -08:00
Makefile mtd: add GPMI-NAND driver in the config and Makefile 2011-09-11 15:02:18 +03:00