]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET
authorBoris Brezillon <boris.brezillon@bootlin.com>
Sun, 16 Dec 2018 08:34:17 +0000 (09:34 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 17 Dec 2018 13:06:26 +0000 (14:06 +0100)
The opcodes used by the controller when doing batched page prog should
be written in NFC_REG_WCMD_SET not FC_REG_RCMD_SET. Luckily, the
default NFC_REG_WCMD_SET value matches the one we set in the driver
which explains why we didn't notice the problem.

Fixes: 614049a8d904 ("mtd: nand: sunxi: add support for DMA assisted operations")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/sunxi_nand.c

index a5c83cbe489728826dc77abbca05a88724c07df1..e828ee50a201885632f015b81e98b5b21d66f937 100644 (file)
@@ -1393,7 +1393,7 @@ static int sunxi_nfc_hw_ecc_write_page_dma(struct nand_chip *chip,
        sunxi_nfc_randomizer_enable(mtd);
 
        writel((NAND_CMD_RNDIN << 8) | NAND_CMD_PAGEPROG,
-              nfc->regs + NFC_REG_RCMD_SET);
+              nfc->regs + NFC_REG_WCMD_SET);
 
        dma_async_issue_pending(nfc->dmac);