Skip to contentSkip to conversation

mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET

PATCH Applied Boris Brezillon 2 participants 2 messages Dec 16, 2018 – Dec 17, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET

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")
---
 drivers/mtd/nand/raw/sunxi_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/sunxi_nand.c +1 -1
index a5c83cbe4897..e828ee50a201 100644
@@ -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);
 
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw

Hi Boris,

Boris Brezillon <[email protected]> wrote on Sun, 16 Dec 2018 09:34:17 +0100:

Quoted 16 lines

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")
---
 drivers/mtd/nand/raw/sunxi_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/sunxi_nand.c +0 -0
index a5c83cbe4897..e828ee50a201 100644

drivers/mtd/nand/raw/sunxi_nand.c static int sunxi_nfc_hw_ecc_write_page_dma(struct nand_chip *chip, · line 1399

Quoted 8 lines
drivers/mtd/nand/raw/sunxi_nand.c +1 -1
@@ -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);
 

Applied to nand/next.

Thanks,
Miquèl