AnsweredAssumed Answered

LS1021 EDMA single request in u-boot

Question asked by Artem Epishkin on Aug 19, 2019
Latest reply on Aug 20, 2019 by Yiping Wang

Hello.

 

I am trying to perform a single mem to mem copy in u-boot via edma. Here is my setup for TCD_#0:

int ch = 0;
out_be16(EDMA_BASE + EDMA_TCD_CSR(ch), 0x0);
out_be16(EDMA_BASE + EDMA_TCD_CITER(ch), 0x0);
out_be16(EDMA_BASE + EDMA_TCD_BITER(ch), 0x0);
out_be32(EDMA_BASE + EDMA_TCD_SADDR(ch), 0xA0000000);
out_be32(EDMA_BASE + EDMA_TCD_DADDR(ch), 0xA1000000);
out_be16(EDMA_BASE + EDMA_TCD_ATTR(ch), 0x202);
out_be16(EDMA_BASE + EDMA_TCD_SOFF(ch), 0x4);
out_be32(EDMA_BASE + EDMA_TCD_NBYTES(ch), 1024);
out_be32(EDMA_BASE + EDMA_TCD_SLAST(ch), 0);
out_be16(EDMA_BASE + EDMA_TCD_DOFF(ch), 0x4);
out_be16(EDMA_BASE + EDMA_TCD_CITER(ch), 0x1);
out_be16(EDMA_BASE + EDMA_TCD_BITER(ch), 0x1);
out_be32(EDMA_BASE + EDMA_TCD_DLAST_SGA(ch), 0);

out_be16(EDMA_BASE + EDMA_TCD_CSR(ch), 0x1);

 

What I was trying to achieve is having 1024 bytes copied from 0xA0000000 to 0xA1000000 in one edma major loop triggered via software. Unfortunately, that didn't work. Nothing was copied and I got an error in DMA_ES (VLD=1; DOE=1; NCE=1), which made no sense to me. And I've also noticed that writing 0x1 to BITER has no effect, as it reads back 0x0.

 

Is there anything wrong with my setup?

How am I supposed to set CITER=BITER=0x1?

Outcomes