]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mtd: nand: tango: Fix incorrect use of SEQIN command
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 17 May 2017 08:47:50 +0000 (10:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:10:17 +0000 (15:10 -0700)
commit a186493237a9d8559997c2f97c33c4716d602fd2 upstream.

SEQIN is supposed to be used when one wants to start programming a page.
What we want here is just to change the column within the page, which is
done with the RNDIN command.

Fixes: 6956e2385a16 ("mtd: nand: add tango NAND flash controller support")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/tango_nand.c

index 49b286c6c10fc85e5ee7e75f4dd10d231c86c73f..022e3d494741d21fea8c1a7b337f0eaf6cad19b0 100644 (file)
@@ -340,7 +340,7 @@ static void aux_write(struct nand_chip *chip, const u8 **buf, int len, int *pos)
 
        if (!*buf) {
                /* skip over "len" bytes */
-               chip->cmdfunc(mtd, NAND_CMD_SEQIN, *pos, -1);
+               chip->cmdfunc(mtd, NAND_CMD_RNDIN, *pos, -1);
        } else {
                tango_write_buf(mtd, *buf, len);
                *buf += len;