need help about uio

hi

I already asked a question.But nobody answered it.

transfer data from custom ip to linux

i used  2016_R2-2017_06_29.img  analog devices  pre-build image for setting-up AD-FMCOMMS3-EBZ with ZCU102 eval board.i design a custom axi4-peripheral ip & added it to AD9361 HDL-DEV.i need to have access to the my custom-ip in linux.how do this work?

should I use the UIO(User Space_Device Drivers)?.I ckeck /dev  device files for uio0/uio1,...but uio does not exist on the analog devices linux.

xilnx recommends to using petalinux+uio but i want work with analog devices  pre-build image

Parents
  • Hi

    I add myip in system.dts same as you

        fpga-axi@0 {
            interrupt-parent = <0x4>;
            compatible = "simple-bus";
            #address-cells = <0x2>;
            #size-cells = <0x1>;
            ranges = <0x0 0x0 0x0 0x0 0xffffffff>;

            dma@9c400000 {
                compatible = "adi,axi-dmac-1.00.a";
                reg = <0x0 0x9c400000 0x10000>;
                #dma-cells = <0x1>;
                interrupts = <0x0 0x6d 0x0>;
                #clock-cells = <0x0>;
                clocks = <0x3 0x47>;
                linux,phandle = <0x45>;
                phandle = <0x45>;

                adi,channels {
                    #size-cells = <0x0>;
                    #address-cells = <0x1>;

                    dma-channel@0 {
                        reg = <0x0>;
                        adi,source-bus-width = <0x40>;
                        adi,source-bus-type = <0x2>;
                        adi,destination-bus-width = <0x40>;
                        adi,destination-bus-type = <0x0>;
                        adi,length-width = <0x18>;
                    };
                };
                   multimy_0@80000000 {
                   compatible = "dmem-uio";
                   reg = <0x80000000 0xffff>;
                    xlnx,s00-axi-addr-width = <0x4>;
                    xlnx,s00-axi-data-width = <0x20>;
                   #address-cells = <0x1>;
                   #size-cells = <0x1>;
                      };
            };

    But

    when i Boot linux with this device tree this error shown in terminal:

     reading system.dtb
    Invalid FAT entry
    8192 bytes read in 43 ms (185.5 KiB/s)
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    reading system.dtb
    Invalid FAT entry
    8192 bytes read in 42 ms (190.4 KiB/s)
    reading Image
    14209536 bytes read in 955 ms (14.2 MiB/s)
    ## Flattened Device Tree blob at 04000000
       Booting using the fdt blob at 0x4000000
       Loading Device Tree to 000000000fff2000, end 000000000ffffa3b ... OK
    fdt_find_or_add_subnode: chosen: FDT_ERR_BADSTRUCTURE
    ERROR: /chosen node create failed
     - must RESET the board to recover.

    FDT creation failed! hanging...### ERROR ### Please RESET the board ###

Reply
  • Hi

    I add myip in system.dts same as you

        fpga-axi@0 {
            interrupt-parent = <0x4>;
            compatible = "simple-bus";
            #address-cells = <0x2>;
            #size-cells = <0x1>;
            ranges = <0x0 0x0 0x0 0x0 0xffffffff>;

            dma@9c400000 {
                compatible = "adi,axi-dmac-1.00.a";
                reg = <0x0 0x9c400000 0x10000>;
                #dma-cells = <0x1>;
                interrupts = <0x0 0x6d 0x0>;
                #clock-cells = <0x0>;
                clocks = <0x3 0x47>;
                linux,phandle = <0x45>;
                phandle = <0x45>;

                adi,channels {
                    #size-cells = <0x0>;
                    #address-cells = <0x1>;

                    dma-channel@0 {
                        reg = <0x0>;
                        adi,source-bus-width = <0x40>;
                        adi,source-bus-type = <0x2>;
                        adi,destination-bus-width = <0x40>;
                        adi,destination-bus-type = <0x0>;
                        adi,length-width = <0x18>;
                    };
                };
                   multimy_0@80000000 {
                   compatible = "dmem-uio";
                   reg = <0x80000000 0xffff>;
                    xlnx,s00-axi-addr-width = <0x4>;
                    xlnx,s00-axi-data-width = <0x20>;
                   #address-cells = <0x1>;
                   #size-cells = <0x1>;
                      };
            };

    But

    when i Boot linux with this device tree this error shown in terminal:

     reading system.dtb
    Invalid FAT entry
    8192 bytes read in 43 ms (185.5 KiB/s)
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    reading system.dtb
    Invalid FAT entry
    8192 bytes read in 42 ms (190.4 KiB/s)
    reading Image
    14209536 bytes read in 955 ms (14.2 MiB/s)
    ## Flattened Device Tree blob at 04000000
       Booting using the fdt blob at 0x4000000
       Loading Device Tree to 000000000fff2000, end 000000000ffffa3b ... OK
    fdt_find_or_add_subnode: chosen: FDT_ERR_BADSTRUCTURE
    ERROR: /chosen node create failed
     - must RESET the board to recover.

    FDT creation failed! hanging...### ERROR ### Please RESET the board ###

Children
No Data