linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET
@ 2018-12-16  8:34 Boris Brezillon
  2018-12-17 14:21 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Brezillon @ 2018-12-16  8:34 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut

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

diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index a5c83cbe4897..e828ee50a201 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -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);
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET
  2018-12-16  8:34 [PATCH] mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET Boris Brezillon
@ 2018-12-17 14:21 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2018-12-17 14:21 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Richard Weinberger, linux-mtd, David Woodhouse, Brian Norris,
	Marek Vasut

Hi Boris,

Boris Brezillon <boris.brezillon@bootlin.com> wrote on Sun, 16 Dec 2018
09:34:17 +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>
> ---
>  drivers/mtd/nand/raw/sunxi_nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
> index a5c83cbe4897..e828ee50a201 100644
> --- a/drivers/mtd/nand/raw/sunxi_nand.c
> +++ b/drivers/mtd/nand/raw/sunxi_nand.c
> @@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-17 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-16  8:34 [PATCH] mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET Boris Brezillon
2018-12-17 14:21 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).