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: 
Visitor nizarsd
Visitor
8,962 Views
Registered: ‎06-04-2014

AXI DMA Driver Problem

Hi,

 

AXI DMA is not recognised by Linux. The boot log has the following two lines related to AXI DMA

 

xilinx-vdma 40400000.dma: failed to get axi_aclk (4294967294)
xilinx-vdma: probe of 40400000.dma failed with error -2

 

The problem is that I have axi_dma and not axi_vdma. Also I checked the axi clock and nothing wrong with it. 

After boot, I never see axidma as one of the devices. 

Any ideas why this may be happening 

 

 

 

0 Kudos
22 Replies
Teacher muzaffer
Teacher
8,938 Views
Registered: ‎03-31-2012

Re: AXI DMA Driver Problem

what does your devicetree entry look like?
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Xilinx Employee
Xilinx Employee
8,919 Views
Registered: ‎07-23-2012

Re: AXI DMA Driver Problem

Which Xilinx DMA device did you select during Linux Kernel configuration?
-----------------------------------------------------------------------------------------------
Please mark the post as "Accept as solution" if the information provided answers your query/resolves your issue.

Give Kudos to a post which you think is helpful.
0 Kudos
Visitor nizarsd
Visitor
8,799 Views
Registered: ‎06-04-2014

Re: AXI DMA Driver Problem

Hi,

 

Thanks for you reply. Here is the DMA devices configs 

 

#
# DMA Devices
#
CONFIG_DMA_ENGINE=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DMA_OF=y
# CONFIG_AMBA_PL08X is not set
CONFIG_AXI_DMAC=y
# CONFIG_FSL_EDMA is not set
# CONFIG_INTEL_IDMA64 is not set
# CONFIG_NBPFAXI_DMA is not set
CONFIG_PL330_DMA=y
CONFIG_XILINX_DMA_ENGINES=y
CONFIG_XILINX_DMATEST=y
# CONFIG_XILINX_VDMATEST is not set
# CONFIG_XILINX_CDMATEST is not set
# CONFIG_XILINX_DPDMA is not set
CONFIG_XILINX_DMA=y
# CONFIG_XILINX_ZYNQMP_DMA is not set
# CONFIG_QCOM_HIDMA_MGMT is not set
# CONFIG_QCOM_HIDMA is not set
# CONFIG_DW_DMAC is not set
# CONFIG_DW_DMAC_PCI is not set

0 Kudos
Participant eduardoparra
Participant
7,489 Views
Registered: ‎06-28-2016

Re: AXI DMA Driver Problem

Hi, I'm having the same problem on the 2016.3 versión. Did you manage to solve it??

0 Kudos
Newbie lbrigante
Newbie
7,235 Views
Registered: ‎03-03-2017

Re: AXI DMA Driver Problem

Hi, I'm also experiencing same problem using Vivado 2016.4 and Petalinux 2016.4. Someone has any idea about this?

 

[    3.640265] /amba_pl/dma@a0000000: could not get #clock-cells for /amba_pl/misc_clk_0
[    3.640389] ERROR: could not get clock /amba_pl/dma@a0000000:s_axi_lite_aclk(0)
[    3.640577] xilinx-vdma a0000000.dma: failed to get axi_aclk (4294967294)
[    3.640691] xilinx-vdma: probe of a0000000.dma failed with error -2

0 Kudos
Highlighted
Moderator
Moderator
7,218 Views
Registered: ‎04-17-2011

Re: AXI DMA Driver Problem

This error is due to an empty clock node being added to pl.dtsi for the clock that connects to DMA.

misc_clk_0: misc_clk_0 {
};

To work around this issue, you should add information of the missing clock in system-top.dts. For example:

&misc_clk_0 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <100>;
};

As you are using 2016.4 version of tool, ensure you edit the system-top.dts file located under: <plnx-projroot>/project-spec/meta-user/recipes-dt/device-tree/
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
Explorer
Explorer
6,566 Views
Registered: ‎02-05-2008

Re: AXI DMA Driver Problem

I am getting still same error after adding these in dts file

 

N JOTHI

0 Kudos
Observer simalps
Observer
6,558 Views
Registered: ‎06-07-2016

Re: AXI DMA Driver Problem

Have you clocked your DMA on Vivado?

You'll do not see any device in /dev/ with the "default" xilinx kernel modules/drivers

0 Kudos
Explorer
Explorer
6,550 Views
Registered: ‎02-05-2008

Re: AXI DMA Driver Problem

Yes. The VDMA is clocked. Works in bare metal.

 

i do not see any node /dev

0 Kudos
Explorer
Explorer
6,361 Views
Registered: ‎11-09-2015

Re: AXI DMA Driver Problem

hi @lbrigante@nizarsd@jothiadithya,

  At this  new  kernel version(16.4),vdma 、dma 、cdma share the common driver xilinx_dma.c 

here is the driver's binding:

https://github.com/Xilinx/linux-xlnx/blob/xilinx-v2016.4/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt

at this binding 

https://github.com/Xilinx/linux-xlnx/blob/xilinx-2016.4/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt#L24

the clk device node need to add at your vdma device node.

zynq's common clock device binding file:

https://github.com/Xilinx/linux-xlnx/blob/xilinx-v2016.4/Documentation/devicetree/bindings/clock/zynq-7000.txt

you can use those example of vdma:

axi_vdma_0: axivdma@40030000 {
	compatible = "xlnx,axi-vdma-1.00.a";
	#dma-cells = <1>;
	reg = < 0x40030000 0x10000 >;
	dma-ranges = <0x00000000 0x00000000 0x40000000>;
	xlnx,num-fstores = <0x8>;
	xlnx,flush-fsync = <0x1>;
	xlnx,addrwidth = <0x20>;
	clocks = <&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4>;
	clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
		      "m_axis_mm2s_aclk", "s_axis_s2mm_aclk";
	dma-channel@40030000 {
		compatible = "xlnx,axi-vdma-mm2s-channel";
		interrupts = < 0 54 4 >;
		xlnx,datawidth = <0x40>;
	} ;
	dma-channel@40030030 {
		compatible = "xlnx,axi-vdma-s2mm-channel";
		interrupts = < 0 53 4 >;
		xlnx,datawidth = <0x40>;
	} ;
} ;

 

but i have some confused with the example 's clocks. according to zynq-7000‘s clock binding,<&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4> refer to 

Clock outputs:
 0:  armpll
 1:  ddrpll
 2:  iopll
 3:  cpu_6or4x
 4:  cpu_3or2x

i'm not sure about this,you can try this binding. if can't work you may change those clk device node.may be change to <&clk 15> <&clk 16> <&clk 17> if use  fclk1、fclk2、fclk3 as s_axi_lite_aclk 、m_axi_mm2s_aclk 、m_axi_s2mm_aclk at your ipi design.

 

BRs

 

 

0 Kudos
Explorer
Explorer
6,358 Views
Registered: ‎11-09-2015

Re: AXI DMA Driver Problem

hi @lbrigante@nizarsd@jothiadithya,

    May be you can use XSDK to generate devicetree.

1.Download the devicetree repo:https://github.com/Xilinx/device-tree-xlnx/releases/tag/xilinx-v2016.4

2.add it to xsdk's repo.

3.more operations refer  to :http://www.wiki.xilinx.com/Build+Device+Tree+Blob

 

 

BRs. 

0 Kudos
Explorer
Explorer
6,340 Views
Registered: ‎02-05-2008

Re: AXI DMA Driver Problem

Have generated using SDK 2016.4. 

0 Kudos
Explorer
Explorer
6,316 Views
Registered: ‎02-05-2008

Re: AXI DMA Driver Problem

Yes. It was clock name issue.

 

Now I get the following error

[    0.867276] [drm] Initialized drm 1.1.0 20060810
[    0.872515] [drm] load() is defered & will be called again
[    1.435411] [drm] load() is defered & will be called again
[    1.483233] [drm] load() is defered & will be called again

0 Kudos
Explorer
Explorer
6,294 Views
Registered: ‎11-09-2015

Re: AXI DMA Driver Problem

hi @jothiadithya,

    your vdma driver probe well? The vdma print those message "Xilinx AXI VDMA Engine Driver Probed!!"?

************************************

Now I get the following error

[    0.867276] [drm] Initialized drm 1.1.0 20060810
[    0.872515] [drm] load() is defered & will be called again
[    1.435411] [drm] load() is defered & will be called again
[    1.483233] [drm] load() is defered & will be called again

*********************** linux has deferred driver probeing mechanism.

The drm driver will retry if they probe fail with the error number:-EPROBE_DEFER.

your error message "[drm] load() is defered & will be called again" print by this line :

https://github.com/Xilinx/linux-xlnx/blob/xilinx-v2016.4/drivers/gpu/drm/xilinx/xilinx_drm_drv.c#L362.

At xilinx_drm_load() function,there are 5 place "goto err_out;" code jump to err_out label.

you need debug the driver to find the issue.(add printk before goto err_out,to find the error reason)

eg:

	private->crtc = xilinx_drm_crtc_create(drm);
	if (IS_ERR(private->crtc)) {
		DRM_DEBUG_DRIVER("failed to create xilinx crtc\n");
		ret = PTR_ERR(private->crtc);
		printk("[%s][%d]ret=%d\n",__func__,__LINE__,ret);
		goto err_out;
	}

 BRs,

HSQ

0 Kudos
Explorer
Explorer
6,270 Views
Registered: ‎02-05-2008

Re: AXI DMA Driver Problem

Hi

 

Thank you for the response. I have a systems which uses VTC, VDMA and VIDEO_OUT. This works fine in standalone system. I try this on linux drm. When the SDk generates the dts file, the vtc is generated for  drivers/media/platform/xilinx/xilinx-vtc. the compatible is ""xlnx,v-tc-6.1". where I am trying use drm. the compatible for this is  "xlnx,v-tc-5.01.a" ( drivers/gpu/drm/xilinx/xilinx_vtc). So I got the error

 

Now I get the following error

 

[    0.867697] [drm] Initialized drm 1.1.0 20060810
[    0.872935] [drm:xilinx_drm_load] *ERROR* failed to get an encoder slave node

 

 

I do not use any encoder. The RGB888 drives directly the LCD.

 

 

the dts of drm is

 

    xilinx_drm{
           compatible = "xlnx,drm";
           clocks = <&clkc 16>;
           xlnx,vtc = <&v_tc_0>;
           planes{  
                   xlnx,pixel-format = "rgb888";                                            
                   plane0 {   
                    
                    dmas = <&axi_vdma_0 1>;
                    dma-names = "vdma0";
                   };
           };
        };

 

Can you let me know what should be the dts?

 

0 Kudos
Explorer
Explorer
6,259 Views
Registered: ‎11-09-2015

Re: AXI DMA Driver Problem

0 Kudos
Explorer
Explorer
6,255 Views
Registered: ‎02-05-2008

Re: AXI DMA Driver Problem

I have gone thro this already. What would be encoder-slave?
0 Kudos
Explorer
Explorer
6,232 Views
Registered: ‎11-09-2015

Re: AXI DMA Driver Problem

hi

    xilinx use adv7511 as the encoder.  But I don't know what is your encoder? 

0 Kudos
Explorer
Explorer
6,131 Views
Registered: ‎02-05-2008

Re: AXI DMA Driver Problem

No encoder used. The lcd is directly driven by axi video out ip.

0 Kudos
Explorer
Explorer
4,436 Views
Registered: ‎11-09-2015

Re: AXI DMA Driver Problem

hi,

    I don't know how to make xilinx drm work without encoder,you can read xililnx drm source  code to work out this.

BRs,

HSQ

0 Kudos
Observer sig7p
Observer
4,013 Views
Registered: ‎06-20-2017

Re: AXI DMA Driver Problem

Hi

 

In my device-tree

 

vdma_3: axivdma@40020000 {
clock-names = "s_axi_lite_aclk", "m_axi_s2mm_aclk", "m_axi_s2mm_aclk";   <= add
clocks = <&clkc 15>, <&clkc 15>, <&clkc 15>;                                   <= add
compatible = "xlnx,axi-vdma-1.00.a";
reg = <0x40020000 0x10000>;
xlnx,addrwidth = <0x20>;                                                                <= add
xlnx,flush-fsync = <1>;
xlnx,num-fstores = <1>;

#dma-cells = <1>;
dma-channel@40090000 {
compatible = "xlnx,axi-vdma-s2mm-channel";
interrupt-parent = <&intc>;
interrupts = <0 33 4>;
clocks = <&clkc 15>;
clock-names = "axis";
xlnx,datawidth = <0x40>;
};
};

 

0 Kudos
Observer sig7p
Observer
4,000 Views
Registered: ‎06-20-2017

Re: AXI DMA Driver Problem

remove some contents. (for petalinux v2016.3)

 

vdma_3: axivdma@40020000 {
clock-names = "s_axi_lite_aclk";
clocks = <&clkc 15>;
compatible = "xlnx,axi-vdma-1.00.a";
reg = <0x40020000 0x10000>;
xlnx,addrwidth = <0x20>;
xlnx,flush-fsync = <1>;
xlnx,num-fstores = <1>;

#dma-cells = <1>;
dma-channel@40090000 {
compatible = "xlnx,axi-vdma-s2mm-channel";
interrupt-parent = <&intc>;
interrupts = <0 33 4>;
clocks = <&clkc 15>;
clock-names = "axis";
xlnx,datawidth = <0x40>;
};
};

0 Kudos