* [U-Boot] [PATCH 0/2] mtd: nand: mxs: fix PIO_WORD number
@ 2014-12-16 14:36 Luca Ellero
2014-12-16 14:36 ` [U-Boot] [PATCH 1/2] mtd: nand: mxs: fix PIO_WORDs in mxs_nand_read_buf() Luca Ellero
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luca Ellero @ 2014-12-16 14:36 UTC (permalink / raw)
To: u-boot
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(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 4+ messages in thread* [U-Boot] [PATCH 1/2] mtd: nand: mxs: fix PIO_WORDs in mxs_nand_read_buf()
2014-12-16 14:36 [U-Boot] [PATCH 0/2] mtd: nand: mxs: fix PIO_WORD number Luca Ellero
@ 2014-12-16 14:36 ` Luca Ellero
2014-12-16 14:36 ` [U-Boot] [PATCH 2/2] mtd: nand: mxs: fix PIO_WORDs in mxs_nand_write_buf() Luca Ellero
2014-12-16 14:38 ` [U-Boot] [PATCH 0/2] mtd: nand: mxs: fix PIO_WORD number Marek Vasut
2 siblings, 0 replies; 4+ messages in thread
From: Luca Ellero @ 2014-12-16 14:36 UTC (permalink / raw)
To: u-boot
There is only one pio_word in this DMA transaction so data field must be 1.
Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
---
drivers/mtd/nand/mxs_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index 616c9ca..d17e0d0 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 2/2] mtd: nand: mxs: fix PIO_WORDs in mxs_nand_write_buf()
2014-12-16 14:36 [U-Boot] [PATCH 0/2] mtd: nand: mxs: fix PIO_WORD number Luca Ellero
2014-12-16 14:36 ` [U-Boot] [PATCH 1/2] mtd: nand: mxs: fix PIO_WORDs in mxs_nand_read_buf() Luca Ellero
@ 2014-12-16 14:36 ` Luca Ellero
2014-12-16 14:38 ` [U-Boot] [PATCH 0/2] mtd: nand: mxs: fix PIO_WORD number Marek Vasut
2 siblings, 0 replies; 4+ messages in thread
From: Luca Ellero @ 2014-12-16 14:36 UTC (permalink / raw)
To: u-boot
There is only one pio_word in this DMA transaction so data field must be 1.
Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
---
drivers/mtd/nand/mxs_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index d17e0d0..428a250 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 0/2] mtd: nand: mxs: fix PIO_WORD number
2014-12-16 14:36 [U-Boot] [PATCH 0/2] mtd: nand: mxs: fix PIO_WORD number Luca Ellero
2014-12-16 14:36 ` [U-Boot] [PATCH 1/2] mtd: nand: mxs: fix PIO_WORDs in mxs_nand_read_buf() Luca Ellero
2014-12-16 14:36 ` [U-Boot] [PATCH 2/2] mtd: nand: mxs: fix PIO_WORDs in mxs_nand_write_buf() Luca Ellero
@ 2014-12-16 14:38 ` Marek Vasut
2 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2014-12-16 14:38 UTC (permalink / raw)
To: u-boot
On Tuesday, December 16, 2014 at 03:36:13 PM, Luca Ellero wrote:
> 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(-)
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.
Acked-by: Marek Vasut <marex@denx.de>
Thank you for fixing this!
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-16 14:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 14:36 [U-Boot] [PATCH 0/2] mtd: nand: mxs: fix PIO_WORD number Luca Ellero
2014-12-16 14:36 ` [U-Boot] [PATCH 1/2] mtd: nand: mxs: fix PIO_WORDs in mxs_nand_read_buf() Luca Ellero
2014-12-16 14:36 ` [U-Boot] [PATCH 2/2] mtd: nand: mxs: fix PIO_WORDs in mxs_nand_write_buf() Luca Ellero
2014-12-16 14:38 ` [U-Boot] [PATCH 0/2] mtd: nand: mxs: fix PIO_WORD number Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox