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.

Linux/AM4372: DMA_SLAVE_BUSWIDTH configulation with Processor-SDK-LINUX-AM437X

Guru 10235 points
Part Number: AM4372

Tool/software: Linux

Hello, TI Experts,

 

Our customer sent us questions about EDMA with Processor-SDK-LINUX-AM437X 05_01_00_11.

They want to use EDMA as "config.src_addr_width = DMA_SLAVE_BUSWIDTH_8_BYTES;"

for data transfer from their FPGA to AM437x via GPMC.

But they fail to use this configuration because of below error detection code in edma.c.

 

drivers/dma/ti/edma.c:

static int edma_slave_config(struct dma_chan *chan, struct dma_slave_config *cfg)

{

       struct edma_chan *echan = to_edma_chan(chan);

       if (cfg->src_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES ||

           cfg->dst_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES)

               return -EINVAL;

 

Question:

  1: Could you tell us the purpose/reason of this error detection code about "DMA_SLAVE_BUSWIDTH_8_BYTES"?

  2: Are there any way to use 8 byte data transfer from their FPGA to AM437x via GPMC with Processor-SDK-LINUX-AM437X?

  

We would appreciate if you tell us the recommended way of 8 byte data transfer from their FPGA to AM437x via GPMC with Processor-SDK-LINUX-AM437X.

 

Best regards,

  • Hi,

    In general cfg->src_addr_width and cfg->dst_addr_width should be defined as the bus width, there is no real benefit if define those to be greater than the bus width. Since AM437x is a 32bit processor, the edma driver limits the two parameters to be less than 8 bytes (DMA_SLAVE_BUSWIDTH_8_BYTES).

    In your case, since GPMC has 16-bits data bus, you are recommended to use DMA_SLAVE_BUSWIDTH_2_BYTES.
  • Hi,

    Thank you very much for your detail explanation.
    This information is very helpful!
    I will send the answer to the customer.

    Best regards,