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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
43 Views
Registered: ‎04-06-2018

DMA w Petalinux say : Unable to prepare the dma engine for the DMA transmit buffer

I'm trying to use DMA w Petalinux, I have a kernel device driver from

https://github.com/bperez77 , I allocated a lot of CMA , 60 MB and the installed the module:

axidma: axidma_dma.c: axidma_dma_init: 718: DMA: Found 1 transmit channels and 1 receive channels.
axidma: axidma_dma.c: axidma_dma_init: 720: VDMA: Found 0 transmit channels and 0 receive channels.

my DMA has SG enabled and loop back M_AXIS_MM2S to S_AXIS_S2MM , IRQs connected but I see them :

48:          0          0     GIC-0  41 Edge      f8005000.watchdog
 49:          0          0     GIC-0  61 Level     xilinx-dma-controller
 50:          0          0     GIC-0  62 Level     xilinx-dma-controller
IPI1:          0          0  Timer broadcast interrupts

my component is

root@peta64v2:~# cat /proc/iomem      
00000000-3fffffff : System RAM
  00008000-008fffff : Kernel code
  01800000-01862143 : Kernel data
40400000-4040ffff : /amba_pl/dma@40400000
e0001000-e0001fff : xuartps

and the device tree is:

/include/ "system-conf.dtsi"
/ {
amba_pl: amba_pl {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "simple-bus";
        ranges ;
        axidma_chrdev: axidma_chrdev@0 {
                compatible = "xlnx,axidma-chrdev";
                dmas = <&axi_dma_0 0 &axi_dma_0 1>;
                dma-names = "tx_channel", "rx_channel";
            };
        axi_dma_0: dma@40400000 {
            #dma-cells = <1>;
            clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
            clocks = <&clkc 15>, <&clkc 15>, <&clkc 15>, <&clkc 15>;
            compatible = "xlnx,axi-dma-1.00.a";
            interrupt-names = "mm2s_introut", "s2mm_introut";
            interrupt-parent = <&intc>;
            interrupts = <0 29 4 0 30 4>;
            reg = <0x40400000 0x10000>;
            xlnx,addrwidth = <0x40>;
            xlnx,sg-length-width = <0xe>;
            dma-channel@40400000 {
                compatible = "xlnx,axi-dma-mm2s-channel";
                dma-channels = <0x1>;
                interrupts = <0 29 4>;
                xlnx,datawidth = <0x40>;
                xlnx,device-id = <0x0>;
            };
            dma-channel@40400030 {
                compatible = "xlnx,axi-dma-s2mm-channel";
                dma-channels = <0x1>;
                interrupts = <0 30 4>;
                xlnx,datawidth = <0x40>;
                xlnx,device-id = <0x1>;
            };
        };
        
    };
};

I changed the positon of the client axi_dma_0 in the device tree to the bottom at some point.

The driver and the App are compile outside the petalinux using makefile. When I try to run the testbench I get this

XI DMA Benchmark Parameters:
    Transmit Buffer Size: 7.91 MiB
    Receive Buffer Size: 7.91 MiB
    Number of DMA Transfers: 1000 transfers

Using transmit channel 0 and receive channel 1.
Failed to perform the AXI DMA read-write transfer: Device or resource busy

dmesg

axidma: axidma_dma.c: axidma_prep_transfer: 236: Unable to prepare the dma engine for the DMA transmit buffer.
cma: cma_release(page eff91000)
cma: cma_release(page eff81000)

I wonder if there is anything to do the IRQ since it is not happening ,

the truth is, I need any Device Driver to work with my Petalinux dma.

 

 

 

 

 

 

Tags (3)
0 Kudos