]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 1 Jun 2017 08:09:33 +0000 (10:09 +0200)
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")
Cc: stable@vger.kernel.org
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
drivers/mtd/nand/tango_nand.c

index 85e0d97593e84fd34ba75df6ed46d98fa04f8321..201979f0c1bdcf17c903b8caf48e14e76a5df1e6 100644 (file)
@@ -332,7 +332,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;