How to do DMA read on Uboot with iMX8QXP ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to do DMA read on Uboot with iMX8QXP ?

跳至解决方案
745 次查看
gaurav_sharma
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 项奖励
回复
1 解答
705 次查看
gaurav_sharma
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 项奖励
回复
2 回复数
706 次查看
gaurav_sharma
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 项奖励
回复
727 次查看
jimmychan
NXP TechSupport
NXP TechSupport

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

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

0 项奖励
回复