mtd: nand: mxs: fix PIO_WORD number
Subsystems (3)
cover mtd: nand: mxs: fix PIO_WORD number
In this driver, the CMDPIOWORDS field doesn't always reflect the real number of pio_words sent in the actual DMA transfer (see iMX6 Reference Manual, Ch. 14.2) This patchset fixes them.
Luca Ellero (2):
mtd: nand: mxs: fix PIO_WORDs in mxs_nand_read_buf()
mtd: nand: mxs: fix PIO_WORDs in mxs_nand_write_buf()
drivers/mtd/nand/mxs_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.10.4
PATCH 1/2 mtd: nand: mxs: fix PIO_WORDs in mxs_nand_read_buf()
There is only one pio_word in this DMA transaction so data field must be 1.
--- drivers/mtd/nand/mxs_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/mxs_nand.c +1 -1
@@ -453,7 +453,7 @@ static void mxs_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int length) d->cmd.data =MXS_DMA_DESC_COMMAND_NO_DMAXFER |MXS_DMA_DESC_IRQ |MXS_DMA_DESC_NAND_WAIT_4_READY |MXS_DMA_DESC_DEC_SEM | -MXS_DMA_DESC_WAIT4END | (4 <<MXS_DMA_DESC_PIO_WORDS_OFFSET ); +MXS_DMA_DESC_WAIT4END | (1 <<MXS_DMA_DESC_PIO_WORDS_OFFSET ); d->cmd.address =0 ;
Signature · 1 line
1.7.10.4
PATCH 2/2 mtd: nand: mxs: fix PIO_WORDs in mxs_nand_write_buf()
In reply to Luca ElleroThere is only one pio_word in this DMA transaction so data field must be 1.
--- drivers/mtd/nand/mxs_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/mxs_nand.c +1 -1
@@ -510,7 +510,7 @@ static void mxs_nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, d->cmd.data =MXS_DMA_DESC_COMMAND_DMA_READ |MXS_DMA_DESC_IRQ |MXS_DMA_DESC_DEC_SEM |MXS_DMA_DESC_WAIT4END | - (4 <<MXS_DMA_DESC_PIO_WORDS_OFFSET ) | + (1 <<MXS_DMA_DESC_PIO_WORDS_OFFSET ) | (length <<MXS_DMA_DESC_BYTES_OFFSET ); d->cmd.address = (dma_addr_t )nand_info->data_buf;
Signature · 1 line
1.7.10.4
cover mtd: nand: mxs: fix PIO_WORD number
In reply to Luca ElleroQuoted 10 lines · Luca Ellero
In this driver, the CMDPIOWORDS field doesn't always reflect the real number of
pio_wordssent in the actual DMA transfer (see iMX6 Reference Manual, Ch. 14.2) This patchset fixes them.Luca Ellero (2):
mtd: nand: mxs: fixPIO_WORDsinmxs_nand_read_buf()
mtd: nand: mxs: fixPIO_WORDsinmxs_nand_write_buf()drivers/mtd/nand/mxs_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Technically, this all makes sense. I see no reason to oppose this series, even if there really was no explicit bug in the first place.
Thank you for fixing this!
Best regards,
Marek Vasut