cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ajaykumar141229
Contributor
Contributor
179 Views
Registered: ‎05-20-2019

Xilinx AXI DMA simple mode

Hello all,

I am testing xilinx axi dma on zynqmp,followed the below link to add device tree information.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842337/Linux+Soft+DMA+Driver

I have a doubt in that confluence

1.In the dtb they have provided <&clkc 15>,what is 15 in that exactly

In my design s_axi_lite_aclk is operating at 100 MHz and mm2c and s2mm clocks are operating at 125MHz.

my system-user.dtsi file is

axi_dma_0: dma@800e0000 {
#dma-cells = <0x1>;
clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
clocks = <0x3 0x47>,<&misc_clk_1>,<&misc_clk_1>;
compatible = "xlnx,axi-dma-1.00.a";
interrupt-names = "mm2s_introut", "s2mm_introut";
interrupt-parent = <&gic>;
interrupts = <0 104 4 0 105 4>;
reg = <0x0 0x800e0000 0x0 0x10000>;
xlnx,sg-length-width = <0xe>;
xlnx,addrwidth = <0x28>;
dma-channel@800e0000 {
compatible = "xlnx,axi-dma-mm2s-channel";
dma-channels = <0x1>;
interrupts = <0 104 4>;
xlnx,datawidth = <0x20>;
xlnx,device-id = <0x0>;
};
dma-channel@800e0030 {
compatible = "xlnx,axi-dma-s2mm-channel";
dma-channels = <0x1>;
interrupts = <0 105 4>;
xlnx,datawidth = <0x20>;
xlnx,device-id = <0x0>;
};
};
misc_clk_1: misc_clk_1 {
#clock-cells = <0x0>;
clock-frequency = <0x7735940>;
compatible = "fixed-clock";
};
axidmatest_1: axidmatest@1 {
compatible ="xlnx,axi-dma-test-1.00.a";
dmas = <&axi_dma_0 0
&axi_dma_0 1>;
dma-names = "axidma0","axidma1";
};

Interrupts are 136 and 137,i am mentioning them in dtsi as (136-32) = 104 and (137-32) = 105

as of now the driver is probed successfully,but when i run axidmatest using insmod axidmatest.ko command, i am getting the following error

[ 307.084118] dmatest: Started 1 threads using dma0chan0 dma0chan1
[ 307.090136] xilinx-vdma 800e0000.dma: Channel 000000003d4e98d7 has errors 40, cdr 0 tdr 0
[ 307.090151] xilinx-vdma 800e0000.dma: Channel 00000000868e44bb has errors 40, cdr 0 tdr 0
[ 307.091495] dma0chan0-dma0c: dstbuf[0x40c] not copied! Expected c3, got 33
[ 307.124851] dma0chan0-dma0c: dstbuf[0x40d] not copied! Expected c2, got 32
[ 307.131720] dma0chan0-dma0c: dstbuf[0x40e] not copied! Expected c1, got 31
[ 307.138588] dma0chan0-dma0c: dstbuf[0x40f] not copied! Expected c0, got 30
[ 307.145454] dma0chan0-dma0c: dstbuf[0x410] not copied! Expected df, got 2f
[ 307.152319] dma0chan0-dma0c: dstbuf[0x411] not copied! Expected de, got 2e
[ 307.159187] dma0chan0-dma0c: dstbuf[0x412] not copied! Expected dd, got 2d
[ 307.166051] dma0chan0-dma0c: dstbuf[0x413] not copied! Expected dc, got 2c
[ 307.172918] dma0chan0-dma0c: dstbuf[0x414] not copied! Expected db, got 2b
[ 307.179783] dma0chan0-dma0c: dstbuf[0x415] not copied! Expected da, got 2a
[ 307.186650] dma0chan0-dma0c: dstbuf[0x416] not copied! Expected d9, got 29
[ 307.193515] dma0chan0-dma0c: dstbuf[0x417] not copied! Expected d8, got 28
[ 307.200382] dma0chan0-dma0c: dstbuf[0x418] not copied! Expected d7, got 27
[ 307.207247] dma0chan0-dma0c: dstbuf[0x419] not copied! Expected d6, got 26
[ 307.214114] dma0chan0-dma0c: dstbuf[0x41a] not copied! Expected d5, got 25
[ 307.220979] dma0chan0-dma0c: dstbuf[0x41b] not copied! Expected d4, got 24
[ 307.227846] dma0chan0-dma0c: dstbuf[0x41c] not copied! Expected d3, got 23
[ 307.234710] dma0chan0-dma0c: dstbuf[0x41d] not copied! Expected d2, got 22
[ 307.241578] dma0chan0-dma0c: dstbuf[0x41e] not copied! Expected d1, got 21
[ 307.248442] dma0chan0-dma0c: dstbuf[0x41f] not copied! Expected d0, got 20
[ 307.255310] dma0chan0-dma0c: dstbuf[0x420] not copied! Expected cf, got 3f
[ 307.262174] dma0chan0-dma0c: dstbuf[0x421] not copied! Expected ce, got 3e
[ 307.269042] dma0chan0-dma0c: dstbuf[0x422] not copied! Expected cd, got 3d
[ 307.275906] dma0chan0-dma0c: dstbuf[0x423] not copied! Expected cc, got 3c
[ 307.282772] dma0chan0-dma0c: dstbuf[0x424] not copied! Expected cb, got 3b
[ 307.289638] dma0chan0-dma0c: dstbuf[0x425] not copied! Expected ca, got 3a
[ 307.296505] dma0chan0-dma0c: dstbuf[0x426] not copied! Expected c9, got 39
[ 307.303370] dma0chan0-dma0c: dstbuf[0x427] not copied! Expected c8, got 38
[ 307.310237] dma0chan0-dma0c: dstbuf[0x428] not copied! Expected c7, got 37
[ 307.317102] dma0chan0-dma0c: dstbuf[0x429] not copied! Expected c6, got 36
[ 307.323969] dma0chan0-dma0c: dstbuf[0x42a] not copied! Expected c5, got 35
[ 307.330834] dma0chan0-dma0c: dstbuf[0x42b] not copied! Expected c4, got 34
[ 307.338480] dma0chan0-dma0c: 132408 errors suppressed
[ 307.343772] dma0chan0-dma0c: #0: 132440 errors with
[ 307.343774] src_off=0x103c dst_off=0x40c len=0x2f08
[ 307.357613] xilinx-vdma 800e0000.dma: Channel 000000003d4e98d7 has errors 40, cdr 0 tdr 0
[ 611.355080] dma0chan0-dma0c: #1: rx test timed out
[ 642.075074] dma0chan0-dma0c: #2: tx test timed out
[ 672.795074] dma0chan0-dma0c: #3: tx test timed out
[ 703.515085] dma0chan0-dma0c: #4: tx test timed out
[ 703.519884] dma0chan0-dma0c: terminating after 5 tests, 5 failures 0 iops 0 KB/s (status 0)

seen all threads related to this error,but nothing helped me

in cat /proc/interrupts i am able to see interrupts 

48:  136 xilinx-dma-controller
49:  137 xilinx-dma-controller

i think i provided the all needed information,i am struggling from two days please some one help me on this.

Regards,

Ajay kumar

 

Tags (3)
0 Kudos
0 Replies