]> git.sur5r.net Git - u-boot/commitdiff
mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Tue, 2 Sep 2014 08:23:09 +0000 (10:23 +0200)
committerAndreas Bießmann <andreas.devel@googlemail.com>
Thu, 18 Sep 2014 22:11:22 +0000 (00:11 +0200)
Disable subpage write when using PMECC to prevent buggy partial page write.

This fix has been taken from linux sources (see commit
90445ff6241e2a13445310803e2efa606c61f276)

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
drivers/mtd/nand/atmel_nand.c

index ccc4dc014c38e54acbcb5fad799ac2989ff66080..9114a86da2bb0ee379739693e19308937516b44e 100644 (file)
@@ -882,6 +882,7 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand,
                return -ENOMEM;
        }
 
+       nand->options |= NAND_NO_SUBPAGE_WRITE;
        nand->ecc.read_page = atmel_nand_pmecc_read_page;
        nand->ecc.write_page = atmel_nand_pmecc_write_page;
        nand->ecc.strength = cap;