How to do DMA read on Uboot with iMX8QXP ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to do DMA read on Uboot with iMX8QXP ?

ソリューションへジャンプ
610件の閲覧回数
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 件の賞賛
返信
1 解決策
570件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
571件の閲覧回数
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 件の賞賛
返信
592件の閲覧回数
jimmychan
NXP TechSupport
NXP TechSupport

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

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

0 件の賞賛
返信