bperez77 / xilinx_axidma

A zero-copy Linux driver and a userspace interface library for Xilinx's AXI DMA and VDMA IP blocks. These serve as bridges for communication between the processing system and FPGA programmable logic fabric, through one of the DMA ports on the Zynq processing system. Distributed under the MIT License.
MIT License
464 stars 227 forks source link

sysfs: cannot create duplicate filename '/class/axidma' #86

Closed visen-yanghx closed 5 years ago

visen-yanghx commented 5 years ago

Hello, I'm trying to install xilinx_axidma driver. For drive coppile I using petalinux with 4.9.0-xilinx-v2018.8 kernel version. After system build I get only messages like these: [ 2.861032] axidma: axidma_dma.c: axidma_dma_init: 708: DMA: Found 1 transmit channels and 1 receive channels. [ 2.870852] axidma: axidma_dma.c: axidma_dma_init: 710: VDMA: Found 0 transmit channels and 0 receive channels. [ 2.881047] axidma: axidma_chrdev.c: axidma_chrdev_init: 593: add a character device---yanghx. [ 2.889977] axidma: axidma_dma.c: axidma_dma_init: 708: DMA: Found 1 transmit channels and 1 receive channels. [ 2.899784] axidma: axidma_dma.c: axidma_dma_init: 710: VDMA: Found 0 transmit channels and 0 receive channels. [ 2.909826] sysfs: cannot create duplicate filename '/class/axidma'

my device-tree axi_dma_0: dma@80010000 {

dma-cells = <1>;

        clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
        clocks = <&clk 71>, <&clk 71>, <&clk 71>, <&misc_clk_0>;
        compatible = "xlnx,axi-dma-1.00.a";
        interrupt-names = "mm2s_introut", "s2mm_introut";
        interrupt-parent = <&gic>;
        interrupts = <0 89 4 0 90 4>;
        reg = <0x0 0x80010000 0x0 0x10000>;
        xlnx,addrwidth = <0x20>;
        xlnx,sg-length-width = <0x10>;
        dma-channel@80010000 {
            compatible = "xlnx,axi-dma-mm2s-channel";
            dma-channels = <0x1>;
            interrupts = <0 89 4>;
            xlnx,datawidth = <0x100>;
            xlnx,device-id = <0x0>;
        };
        dma-channel@80010030 {
            compatible = "xlnx,axi-dma-s2mm-channel";
            dma-channels = <0x1>;
            interrupts = <0 90 4>;
            xlnx,datawidth = <0x100>;
            xlnx,device-id = <0x1>;
        };
    };

    axi_dma_1: dma@80020000 {
        #dma-cells = <1>;
        clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
        clocks = <&clk 71>, <&clk 71>, <&clk 71>, <&misc_clk_0>;
        compatible = "xlnx,axi-dma-1.00.a";
        interrupt-names = "mm2s_introut", "s2mm_introut";
        interrupt-parent = <&gic>;
        interrupts = <0 91 4 0 92 4>;
        reg = <0x0 0x80020000 0x0 0x10000>;
        xlnx,addrwidth = <0x20>;
        xlnx,sg-length-width = <0x10>;
        dma-channel@80020000 {
            compatible = "xlnx,axi-dma-mm2s-channel";
            dma-channels = <0x1>;
            interrupts = <0 91 4>;
            xlnx,datawidth = <0x100>;
            xlnx,device-id = <0x0>;
        };
        dma-channel@80020030 {
            compatible = "xlnx,axi-dma-s2mm-channel";
            dma-channels = <0x1>;
            interrupts = <0 92 4>;
            xlnx,datawidth = <0x100>;
            xlnx,device-id = <0x1>;
        };
    };

    };

axidma_chrdev: axidma_chrdev@0 { compatible = "xlnx,axidma-chrdev"; dmas = <&axi_dma_0 0x0 &axi_dma_0 0x1>; dma-names = "axidma0_tx_channel", "axidma0_rx_channel"; dma-id = <0x0>; chrdev-name = "axidma0"; minor-num = <0x0>; num-devices = <0x1>; };

         axidma_chrdev@1 {
    compatible = "xlnx,axidma-chrdev";
    dmas = <&axi_dma_1 0x0 &axi_dma_1 0x1>;
    dma-names = "axidma1_tx_channel", "axidma1_rx_channel";
    dma-id = <0x1>;
    chrdev-name = "axidma1";
    minor-num = <0x1>;
    num-devices = <0x1>;
};