]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
mtd: nand: fix for mtd nand_oob test
authorNaga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Tue, 31 Oct 2017 07:17:19 +0000 (12:47 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 3 Nov 2017 07:21:25 +0000 (08:21 +0100)
mtd nand oob test gives reset to nand device at the start.
This will be problem for the nand devices which are configured for
nvddr modes. i.e controller and device both are not is same mode,
resulting failure in mtd-oob test. this patch fixes this with out
issuing reset.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mtd/nand/nand_base.c

index 157737e12e0d5089290bf6492c4bd73b8aceca81..e551ed47108f12e7299e1aea3f21b181ddc9a677 100644 (file)
@@ -2963,10 +2963,10 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
         * interface mode. This will be the problem for devices configured for
         * NVDDR modes. So, limiting the reset operation to Toshiba devices.
         */
-       if (chip->onfi_params.jedec_id == NAND_MFR_TOSHIBA)
+       if (chip->onfi_params.jedec_id == NAND_MFR_TOSHIBA) {
                chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
-
-       nand_reset(chip, chipnr);
+               nand_reset(chip, chipnr);
+       }
 
        chip->select_chip(mtd, chipnr);