UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

Linux DMA tx channel not found

Accepted Solution Solved
Observer
Posts: 24
Registered: ‎05-06-2015
Accepted Solution

Linux DMA tx channel not found

Hi,

 

  I'm working on DMA for days.I've learned how to use DMA IP in linux with data loopback. However,when I try to cut down the loop and only use the rx channel to send data to memory, I meet with problems.I use TPG to produce data and send it to DMA through AXIS bus,and the Constant set to 1. When I get linux started and try to insmod the driver, I cannot get an expected result as the system cannot find tx device for data transfer.

搜狗截图_2015-12-12_11-14-25.png

The UART's Output:

zynq> insmod hello.ko
enter dma chanel
zfdriver: tx match is 100001
zfdriver: rx match is 100002
zfdriver: Did not find tx device
zfdriver: Found rx device
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 5a618000
[00000000] *pgd=1f5f9831, *pte=00000000, *ppte=00000000
Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM
Modules linked in: hello(O+)
CPU: 1 PID: 589 Comm: insmod Tainted: G           O   3.17.0-xilinx #7
task: 5f527ac0 ti: 5f728000 task.ti: 5f728000
PC is at axi_dma_init+0xb0/0x4a8 [hello]
LR is at axi_dma_init+0xb0/0x4a8 [hello]
pc : [<3f0000ec>]    lr : [<3f0000ec>]    psr: 60000013
sp : 5f729da8  ip : 00000000  fp : 5f729f58
r10: 00000001  r9 : 00000000  r8 : 3f00003c
r7 : 5f5d9e80  r6 : 40663598  r5 : 00000000  r4 : 5f7724f4
r3 : 00000000  r2 : 00000000  r1 : 5f729d30  r0 : 00000019
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 18c5387d  Table: 1a61804a  DAC: 00000015
Process insmod (pid: 589, stack limit = 0x5f728240)
Stack: (0x5f729da8 to 0x5f72a000)
9da0:                   404830dc 401d04e4 00000000 0000000a ffffffff ffffffff
9dc0: 5f46da34 20000093 00000280 00100001 00100002 5f729e28 40578343 00000015
9de0: 5f4ccb00 3f00003c 00000000 00000001 5f729f58 401d24e8 000000d0 5f729e28
9e00: 5f729e28 3f00085c 3f000868 5f4ccb00 40663598 40663598 5f5d9e80 3f00003c
9e20: 00000000 00000001 5f729f58 40008878 00000000 00000001 00000001 40088184
9e40: 40663504 5ffc5380 5fbd8000 00000000 5f5d9e80 00000000 0000001c 00000000
9e60: 5ffc5380 40089570 5ffc5380 00000000 00000000 5f4ccb00 00000002 00000001
9e80: 3f00085c 3f000868 00000001 5f5d9e80 3f0008a4 0000001c 00000001 4006f988
9ea0: 3f000868 00007fff 4006d404 60803000 60800000 4006d058 00000000 00000000
9ec0: 40660490 3f000994 4046c158 608c826c 5f729eec 000da53f 000000d2 405ce9b4
9ee0: 5f4db940 ffffffff 00000010 000002d2 000e3aac 00000000 00000000 00000000
9f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9f20: 00000000 00000000 00000000 00000000 000000d2 000e6040 00001a99 000da53f
9f40: 00000080 4000e1a4 5f728000 00000000 000e3aac 4006fd10 608c7000 00001a99
9f60: 608c7efc 608c7e07 608c88e4 000009a4 00000aa4 00000000 00000000 00000000
9f80: 00000016 00000017 0000000e 0000000c 0000000a 00000000 000e33fc 3e9a0e84
9fa0: 00000069 4000e020 000e33fc 3e9a0e84 000e6040 00001a99 000da53f 00000000
9fc0: 000e33fc 3e9a0e84 00000069 00000080 3e9a0e88 00000000 3e9a0e88 000e3aac
9fe0: 00000001 3e9a0b3c 0001dca0 36e3abd4 60000010 000e6040 00000000 00000000
[<3f0000ec>] (axi_dma_init [hello]) from [<40008878>] (do_one_initcall+0xf8/0x190)
[<40008878>] (do_one_initcall) from [<4006f988>] (load_module+0x18ac/0x1b74)
[<4006f988>] (load_module) from [<4006fd10>] (SyS_init_module+0xc0/0xd8)
[<4006fd10>] (SyS_init_module) from [<4000e020>] (ret_fast_syscall+0x0/0x30)
Code: e3540000 159f03a0 059f03a0 eb517fa2 (e5953000)
---[ end trace 87a90eec3bb4db06 ]---
Segmentation fault

The associated files are listed below.

 


Accepted Solutions
Observer
Posts: 24
Registered: ‎05-06-2015

Re: Linux DMA tx channel not found

Well, I forgot to config tx chan in HW when designing. 

View solution in original post


All Replies
Observer
Posts: 24
Registered: ‎05-06-2015

Re: Linux DMA tx channel not found

I learn the example from here. It gives a way to use DMA with only rx chan though problem still remains. The loopback example has been tested successfully with other examples. I do not know whether error occurs in hardware or any other places. Can anyone help me solve the problems I've met with ? Thanks for all helps.

Observer
Posts: 24
Registered: ‎05-06-2015

Re: Linux DMA tx channel not found

Well, I forgot to config tx chan in HW when designing.