This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x: DMA blocks of data bigger than 64K through GPMC

I am trying to implement a large data DMA from GPMC area. The data volume is more than 1 MB.

This how I setup DMA in my kernel driver:

           // Setting parameters

           omap_set_dma_transfer_params(ch_out,

                     OMAP_DMA_DATA_TYPE_S32,         // element size (4 Bytes)

                     elements,                       // # elements in frame

                     frames,                         // # frames in block

                     OMAP_DMA_SYNC_FRAME,            // sync_mode

                     0, OMAP_DMA_SRC_SYNC);

           omap_set_dma_src_params(ch_out, 0, OMAP_DMA_AMODE_POST_INC,

                     src_buf_phys,                   // source memory address

                     0,

                     0);

           omap_set_dma_dest_params(ch_out, 0, OMAP_DMA_AMODE_POST_INC,

                     dest_buf_phys,                  // dest memory address

                     sizeof(UInt32),                 // offset between elements in dest memory

                     elements);                      // offset between frames in dest memory

 

Everything works while number of frames = 1 (up to 64K words).

Whenever I make frames more than 1:

  1. If sync_mode is OMAP_DMA_SYNC_FRAME -  DMA stops after 1st frame

  2. If I am using OMAP_DMA_SYNC_BLOCK synchronization – I am getting a run-time error (“SDMA2EDMA: Line:202 : Param 'sync_mode' out of range”).

     

If I am reading manual right (AM335x Sitara Technical Reference Manual, page 1483) it also says:

“ABC-synchronized transfers are not directly supported. But can be logically achieved by chaining between multiple AB-synchronized transfers.”

 

Does it mean that I have to implement this loop in my kernel driver?

This will definitely work, but also will significantly decrease the performance of the system

Thanks

Leonid.