]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mtd: nand: sunxi: avoid retrieving data before ECC pass
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Tue, 20 Oct 2015 20:16:01 +0000 (22:16 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 2 Nov 2015 20:54:37 +0000 (12:54 -0800)
The in-band data are copied twice: before ECC correction and after the
ECC engine has fixed all the fixable bitflips.
Drop the useless memcpy_fromio operation by passing a NULL pointer when
calling sunxi_nfc_read_buf().

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/sunxi_nand.c

index 96f7370a404fa17b7228a128cb0fb7d598000b4b..824711845c44cb44a453b56b39c7f255bd43ae1b 100644 (file)
@@ -586,7 +586,7 @@ static int sunxi_nfc_hw_ecc_read_chunk(struct mtd_info *mtd,
        if (*cur_off != data_off)
                nand->cmdfunc(mtd, NAND_CMD_RNDOUT, data_off, -1);
 
-       sunxi_nfc_read_buf(mtd, data, ecc->size);
+       sunxi_nfc_read_buf(mtd, NULL, ecc->size);
 
        if (data_off + ecc->size != oob_off)
                nand->cmdfunc(mtd, NAND_CMD_RNDOUT, oob_off, -1);