]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Xilinx: ARM: nand: Skip reading the OOB for on-die ecc
authorJoe Hershberger <joe.hershberger@ni.com>
Mon, 18 Jun 2012 23:46:35 +0000 (18:46 -0500)
committerJohn Linn <john.linn@xilinx.com>
Tue, 19 Jun 2012 21:21:30 +0000 (14:21 -0700)
OOB is not needed for on-die flash.  Don't waste time reading it.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/mtd/nand/zynq_nand.c

index 33fec9a0f1a8f7a018e1e9bd8fae3aa411ad5efa..561a94c89c5e69bed1784526065fbc4fd6a9034f 100644 (file)
@@ -517,6 +517,13 @@ static int xnandps_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
        return 0;
 }
 
+static int xnandps_read_page_raw_nooob(struct mtd_info *mtd, struct nand_chip *chip,
+                                       uint8_t *buf, int page)
+{
+       chip->read_buf(mtd, buf, mtd->writesize);
+       return 0;
+}
+
 static int xnandps_read_subpage_raw(struct mtd_info *mtd, struct nand_chip *chip,
                                        uint32_t data_offs, uint32_t readlen, uint8_t *buf)
 {
@@ -1211,7 +1218,7 @@ int zynq_nand_init(struct nand_chip *nand_chip)
                /* The software ECC routines won't work with the
                                SMC controller */
                nand_chip->ecc.mode = NAND_ECC_HW;
-               nand_chip->ecc.read_page = xnandps_read_page_raw;
+               nand_chip->ecc.read_page = xnandps_read_page_raw_nooob;
                nand_chip->ecc.read_subpage = xnandps_read_subpage_raw;
                nand_chip->ecc.write_page = xnandps_write_page_raw;
                nand_chip->ecc.read_page_raw = xnandps_read_page_raw;