Data inconsistency observed while performing to-device DMA with spi-nor (m25p80)
Hi, I am doing a DMA transfer (to device) using pl330 driver from memory(DDR) to device(m25p80, spi- nor). I am sending data in chunks of 256 bytes ( m25p80 - writesize) using scatter-gather mechanism. I see that when I try to write 8K of data, one or the other 256 bytes(or lesser) are not written or are partially written with 0s. This problem is observed only when I perform a to-device DMA transfer. When I perform a from-device DMA transfer, I am able to read correct data. Regards, Ayan Kumar Halder
On Sun, Jul 26, 2015 at 5:02 PM, AYAN KUMAR HALDER <ayankumarh@gmail.com> wrote:
Hi,
I am doing a DMA transfer (to device) using pl330 driver from memory(DDR) to device(m25p80, spi- nor). I am sending data in chunks of 256 bytes ( m25p80 - writesize) using scatter-gather mechanism.
I see that when I try to write 8K of data, one or the other 256 bytes(or lesser) are not written or are partially written with 0s.
This problem is observed only when I perform a to-device DMA transfer. When I perform a from-device DMA transfer, I am able to read correct data.
There could be multiple issues like - In buffers allocations, is the buffer used for to-device DMA is physically contiguous? - Caching issue, buffer should be un-cacheable. - Any other programming error. - Chetan Nanda Regards,
Ayan Kumar Halder
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (2)
-
AYAN KUMAR HALDER -
Chetan Nanda