Hi igorpadykov,
in my script SDMA works independently from the processor&Linux. The script read&write to the EIM bus periodically. The following code is an example of my peripheral operation:
------------------------------------------
| #Reg[4] = FPGA_BASE_ADDR; | | | // EIM_BUS_ADDRESS |
| #Reg[7] = 0xFFFFFFFF; | | | | // for always loop |
getdescription:
################################################### CHECK READY FLAG
| stf r5, 0xc7 | | # Get the Desciptor (To MSA, incremented mode, 32 bit data width) |
| ldf r0, 0xc8 | | # Copy first dw of SDMA descriptor (pd,) |
| btsti r7, 0 | | # always loop |
| bf getdescription | # always loop | |
------------------------------------------ | | | |
As I said before, by this code SDMA has no dependency to main processor. It is an infitinite loop to read 1Dword from EIM_BUS and it cause huge gaps between the read operations.
I think this gap is caused from memory barrier for two reasons. First the gap duration in SDMA operation is the same with the main processor read operation with memory barrier. Second in ARM site, it is stated that "A barrier is required between a CPU memory access and a DMA operation".
Anyway, I may totally wrong about "memory barrier" but I could not understand why SDMA needs these huge gaps between its operations. The problem is not from EIM_BUS because when I run a kthread concurrently with sdma operation, I can reach the EIM_BUS and complete a read&write operation between the SDMA operations!!
Regards.
Turgay.