AnsweredAssumed Answered

SDMA custom script: DMA Memory Map to access peripherals?

Question asked by Eli Billauer on Jul 23, 2017
Latest reply on Aug 10, 2017 by Eli Billauer

Hello,

 

I'm working on an SDMA script of my own for i.MX6, which is intended to read from the eCSPI's registers and copy the data into memory. I know this can be done with the standard scripts based upon buffer descriptors, but I need the SDMA script to do a bit of other housekeeping as well. Hence the custom script.

 

So the relevant assembly snippet (using a non-standard assembler) is

 

69c3 (0110100111000011) |     stf    r1, 0xc3    # PSA = r1 for 32-bit frozen peripheral read
62c8 (0110001011001000) |     ldf    r2, 0xc8    # Read peripheral register into r2

 

The question is about the assignment of PSA, which is the value of r1 in the example above. Looking at the Linux driver for eCSPI (spi-imx.c, kernel 4.1.15), the source address used is the physical address as seen by the ARM (application) processor. That is, 0x2008000 for eCSPI1 on i.MX6. And indeed, when using this address, a valid value is read into r2 in the code snippet above.

 

But the Reference Manual [1] section 2.4, DMA Memory Map, says that eCSPI1 should be accessed at 0x2000. I tried that too, and got rubbish.

 

So my question is: If 0x2008000 is the correct address, what is the DMA Memory Map about?

 

I could, of course, forget all about this and use the address that seems to work ("you don't argue with something that works", I've been told a few times), and still I'd like to sort this out. Have I missed anything?

 

Thanks in advance,

   Eli

 

[1] http://www.nxp.com/docs/en/reference-manual/IMX6SDLRM.pdf

Outcomes