cf_axi_adc driver is failing during ring buffer creation

Hi again,

With my JESD issue solved I'm getting further to having the iio device show up. Right now the cf_axi_adc driver fails a few times and then is able to attach the SPI interface and configure the JESD links.

Right now however I'm now hung up with the cf_axi_adc driver failing creation of the DMA ring buffer. I was able to track the error to the function dma_request_slave_channel_reason(). The function returns an error of -517 which is -EPROBE_DEFER.

As far as I know I don't have anything wrong with with my device tree or FPGA fabric since the configuration of both matches what is done in the fmcjesdadc1 project and what I've described in earlier posts. (https://ez.analog.com/linux-device-drivers/linux-software-drivers/f/q-a/107670/axi_adxcvr-driver-returns-error-when-trying-to-configure-clock)

Is there something simple I could be missing that is causing the  ring buffer failure such as missing another kernel driver or library? I have libiio compiled and installed and I do have the ADI AXI_DMAC driver installed in my kernel as well. I'm using HDL 2018_R2 and ADI Linux 2018_R2 and compiling everything using Vivado 2018.2 and Petalinux 2018.2 with the ADI Linux as a external source.

Thanks,

Parents
  • 0
    •  Analog Employees 
    on Mar 7, 2019 8:50 AM over 1 year ago

    -EPROBE_DEFER is not a full-failure error in it's own right.

    It's the way that Linux works in order to ensure some ordering when devices get loaded.

    If some drivers require some other driver or resource to be loaded, and it isn't loaded, they can typically return -EPROBE_DEFER and the kernel will come back a few times to retry probing/loading of the driver until success is returned.

    These errors can be a bit confusing, but this is how Linux was designed.

    Is there some weird fault/error that you are seeing with device operation after the system loads ?

    Thanks

    Alex

  • Got it! Looks like Petalinux 2018.2 is a little particular on how you want to write the entry for the device tree for the AXI_DMAC core.

    Here is what the broken one looks like:

    &axi_ad9250_0_dma {
    	compatible = "adi,axi-dmac-1.00.a";
    	reg = <0x7c420000 0x10000>;
    	#dma-cells = <1>;
    	interrupts = <0 57 0>;
    	clocks = <&clk_bus_0>;
    
    	adi,channels {
    		#address-cells = <1>;
    		#size-cells = <0>;
    	
    		dma-channel@0 {
    			reg = <0>;
    			adi,source-bus-width = <64>;
    			adi,source-bus-type = <2>;
    			adi,destination-bus-width = <64>;
    			adi,destination-bus-type = <0>;
    		};
    	};
    
    };

    Looks fine right? It's exactly the same as the entry for the fmcjesdadc1 reference project in HDL 2018_R2.

    Here is what the working on looks like:

    &axi_ad9250_0_dma {
    	compatible = "adi,axi-dmac-1.00.a";
    	reg = <0x7c420000 0x10000>;
    	#dma-cells = <1>;
    	interrupt-names = "irq";
    	interrupt-parent = <&intc>;
    	interrupts = <0 57 0>;
    	clocks = <&clk_bus_0>;
    
    	adi,channels {
    		#address-cells = <1>;
    		#size-cells = <0>;
    	
    		dma-channel@0 {
    			reg = <0>;
    			adi,source-bus-width = <64>;
    			adi,source-bus-type = <2>;
    			adi,destination-bus-width = <64>;
    			adi,destination-bus-type = <0>;
    		};
    	};
    
    };

    I needed to define interrupt-names and interrupt-parent for the entry and that seemed to solve it. I'll have to check the reference project and see if those two definitions are somewhere else.

    iio_info prints out all the defining information and I now see both AD9250 devices in the IIO directory. I'm still new to IIO and JESD so I don't know if the link is 100% since I'm not happy with how my fellow engineers laid out the custom board I am working with but, I should be able to do more testing now.

    Thanks.

Reply
  • Got it! Looks like Petalinux 2018.2 is a little particular on how you want to write the entry for the device tree for the AXI_DMAC core.

    Here is what the broken one looks like:

    &axi_ad9250_0_dma {
    	compatible = "adi,axi-dmac-1.00.a";
    	reg = <0x7c420000 0x10000>;
    	#dma-cells = <1>;
    	interrupts = <0 57 0>;
    	clocks = <&clk_bus_0>;
    
    	adi,channels {
    		#address-cells = <1>;
    		#size-cells = <0>;
    	
    		dma-channel@0 {
    			reg = <0>;
    			adi,source-bus-width = <64>;
    			adi,source-bus-type = <2>;
    			adi,destination-bus-width = <64>;
    			adi,destination-bus-type = <0>;
    		};
    	};
    
    };

    Looks fine right? It's exactly the same as the entry for the fmcjesdadc1 reference project in HDL 2018_R2.

    Here is what the working on looks like:

    &axi_ad9250_0_dma {
    	compatible = "adi,axi-dmac-1.00.a";
    	reg = <0x7c420000 0x10000>;
    	#dma-cells = <1>;
    	interrupt-names = "irq";
    	interrupt-parent = <&intc>;
    	interrupts = <0 57 0>;
    	clocks = <&clk_bus_0>;
    
    	adi,channels {
    		#address-cells = <1>;
    		#size-cells = <0>;
    	
    		dma-channel@0 {
    			reg = <0>;
    			adi,source-bus-width = <64>;
    			adi,source-bus-type = <2>;
    			adi,destination-bus-width = <64>;
    			adi,destination-bus-type = <0>;
    		};
    	};
    
    };

    I needed to define interrupt-names and interrupt-parent for the entry and that seemed to solve it. I'll have to check the reference project and see if those two definitions are somewhere else.

    iio_info prints out all the defining information and I now see both AD9250 devices in the IIO directory. I'm still new to IIO and JESD so I don't know if the link is 100% since I'm not happy with how my fellow engineers laid out the custom board I am working with but, I should be able to do more testing now.

    Thanks.

Children
No Data