How to do DMA read on Uboot with iMX8QXP ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to do DMA read on Uboot with iMX8QXP ?

Jump to solution
251 Views
gauravsharma7
NXP Employee
NXP Employee

Hi all,
On iMX8QXP i am trying to configure DMA to read from a Source to Destination Address. Referring to iMX8DQXPRM, I am configuring DMA to read 0x100000 bytes from 0xBEEFBEE0 to 0xCAFECAF0.

gauravsharma7_0-1710950943430.png

On U-boot, I am writing the DMA registers as follows:-

mw.l 0x5f010a6c 0x8000000  -- Configure DMA channel context register for read channel
mw.l 0x5f010c70 0x04000008  -- Configure DMA channel control register
mw.l 0x5f010c78 0x00100000 -- size of dma read transfer
mw.l 0x5f010c7c 0xBEEFBEE0 -- Source address low
mw.l 0x5f010c80 0x0 -- Source address high
mw.l 0x5f010c84 0xCAFECAF0 -- Destination address low
mw.l 0x5f010c88 0x0 -- Destination address high
mw.l 0x5f01099C 0x1 -- conf DMA read engine enable
mw.l  0x5f010A18 0x0 -- conf DMA read interrupt mask
mw.l 0x5f0109A0 0x0 -- DMA read doorbell


I have already tried DMA write which is working fine. however I am not able to get DMA read work with the above process. Can anyone tell me if I am missing something here ?

Thanks

0 Kudos
1 Solution
211 Views
gauravsharma7
NXP Employee
NXP Employee

I was able to do DMA read. looks like the RM of iMX8QXP that I was referring to, did not have the DMA read registers info. I had to dig in the iMX8QM RM since the PCIe controller being used is the same apparently. 

View solution in original post

0 Kudos
2 Replies
212 Views
gauravsharma7
NXP Employee
NXP Employee

I was able to do DMA read. looks like the RM of iMX8QXP that I was referring to, did not have the DMA read registers info. I had to dig in the iMX8QM RM since the PCIe controller being used is the same apparently. 

0 Kudos
233 Views
jimmychan
NXP TechSupport
NXP TechSupport

I think you could take the source code in SDK for reference.

https://mcuxpresso.nxp.com/en/welcome

0 Kudos