Why interrupts are not shown in /proc/interrupts?

77 Views Asked by At

I am trying to use UIO driver to transfer data using AXI DMA from programmable logis (PL) to Processing system (PS) on SOC minized board(ZYNQ 7000 series). I have loaded the minized board with petalinux and on typing

cat /proc/interrupts

I can see the interrupts number 61 and 62 for the dmas. From my application I have succefully map the uio driver and can write to all the relavent registers as shown below

    DMA_Set(DMA_Base_Addr+MM2S_DMACR, 0x00000004);
    DMA_Set(DMA_Base_Addr+S2MM_DMACR, 0x00000004);
    DMA_Set(DMA_Base_Addr+MM2S_DMACR, 0x00000000);
    DMA_Set(DMA_Base_Addr+S2MM_DMACR, 0x00000000);
    DMA_Set(DMA_Base_Addr+MM2S_DMACR, 0x00007000);
    DMA_Set(DMA_Base_Addr+S2MM_DMACR, 0x00007000);
    DMA_Set(DMA_Base_Addr+MM2S_SA,    0x30000000);
    DMA_Set(DMA_Base_Addr+S2MM_DA,    0x30000400);
    DMA_Set(DMA_Base_Addr+MM2S_DMACR, 0x00000001);
    DMA_Set(DMA_Base_Addr+S2MM_DMACR, 0x00000001);
    DMA_Set(DMA_Base_Addr+MM2S_LENGTH,0x30000400);
    DMA_Set(DMA_Base_Addr+S2MM_LENGTH,0x00000400);

The regester values of S2MM_DMASR and MM2S_DMASR gives 1002 indicating that the 12 bit of the status register is set, that mean interrupt has occoured. But

cat /proc/interrupts

on the board still shows interrupt count as 0 for dmas. Further the values of S2MM_DMACR and MM2S_DMACR is 10003 indicating that the 15th bit is 1. On the other hand in the mannual https://docs.xilinx.com/r/en-US/pg021_axi_dma/S2MM_DMACR-S2MM-DMA-Control-Register-Offset-30h it is clearly mentioned that 15th bit is always 0. Can anyone suggest why this two anomaly?

I have reserved memory in my board by modifying system-user.dtsi file and i get the following in my board

New:~$ dmesg |grep eserved
Reserved memory: created DMA memory pool at 0x30000000, size 256 MiB
OF: reserved mem: initialized node buffer@0x30000000, compatible id shared-dma-pool
cma: Reserved 16 MiB at 0x2f000000
Memory: 735840K/1048576K available (7168K kernel code, 243K rwdata, 1904K rodata, 1024K init, 118K bss, 296352K res)
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.

I was expecting that the above show increase the interrup number 46 and 15th bit of the control registers to be 0.

The sustem-user.dtsi is below:

/include/ "system-conf.dtsi"
/ {
    chosen {
        bootargs = "earlycon clk_ignore_unused uio_pdrv_genirq.of_id=generic-uio rootwait quiet loglevel=0";
        stdout-path = "serial0:115200n8";
    };
      reserved-memory{
    #address-cells=<1>;
    #size-cells =<1>;
    ranges;
    dma_reserved:buffer@0{
        compatible="shared-dma-pool";
        no-map;
        reg=<0x30000000 0x1000000>;
    };
    dma_proxy@0 {
        compatible ="xlnx,dma_proxy";
        dmas = <&axi_dma_0 1>;
        dma-names = "dma1";
        memory-region = <&dma_reserved>;
    };
};


&amba_pl {
    dma1:@dma40400000 {
    compatible = "generic-uio";
    reg = <0x40400000 0x10000>;
    interrupt-parent = <&intc>;
    interrupts = <0 30 4>;
    };
};



&axi_dma_0{
    compatible = "generic-uio";
    linux,uio-name = "dma0";
};

&qspi {
        #address-cells = <1>;
        #size-cells = <0>;
        flash0: flash@0 {
                compatible = "n25q512a","micron,m25p80","jedec,spi-nor";
                spi-max-frequency = <50000000>;
                reg = <0x0>;
                #address-cells = <1>;
                #size-cells = <1>;
        };
};
0

There are 0 best solutions below