cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Participant
Participant
5,518 Views
Registered: ‎06-28-2016

Request irq using AXI Interrupt Controller

Hi,

I'm trying to use an AXI Interrupt Controller to handle the interrupts of my system. I have created a Custom IP which produces several interrupts, so i am not abe to use the GIC. When i request the IRQs on my custom driver, it seems to try to assign the same irq to all my interrupts and i get the following error:

[   18.765525] genirq: Flags mismatch irq 217. 00000004 (Custom_IP_driver) vs. 00000004 (Custom_IP_driver)
[   18.774909] Custom_IP_driver 80010000.custom_ip: testmodule: Could not allocate interrupt 217.
[   18.783065] Trying to free already-free IRQ 217

It allocates correctly the first IRQ on position 217, but it tries to allocate the second irq on 217 too.

 

Any idea?

0 Kudos
8 Replies
Highlighted
Moderator
Moderator
5,442 Views
Registered: ‎04-17-2011

Re: Request irq using AXI Interrupt Controller

Please post your device tree for details on Interrupt setup.
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.
----------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Participant
Participant
5,415 Views
Registered: ‎06-28-2016

Re: Request irq using AXI Interrupt Controller

 

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version: HSI 2016.3
 * Today is: Tue Feb 14 11:11:22 2017
*/


/ {
	amba_pl: amba_pl {
		#address-cells = <2>;
		#size-cells = <2>;
		compatible = "simple-bus";
		ranges ;
		axi_dma_0: dma@80000000 {
			#dma-cells = <1>;
			clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
			clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
			compatible = "xlnx,axi-dma-1.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 89 4 0 90 4>;
			reg = <0x0 0x80000000 0x0 0x10000>;
			xlnx,addrwidth = <0x20>;
			dma-channel@80000000 {
				compatible = "xlnx,axi-dma-mm2s-channel";
				dma-channels = <0x1>;
				interrupts = <0 89 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
			};
			dma-channel@80000030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				dma-channels = <0x1>;
				interrupts = <0 90 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
			};
		};
		axi_dma_1: dma@80030000 {
			#dma-cells = <1>;
			clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
			clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
			compatible = "xlnx,axi-dma-1.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 91 4 0 92 4>;
			reg = <0x0 0x80030000 0x0 0x10000>;
			xlnx,addrwidth = <0x20>;
			dma-channel@80030000 {
				compatible = "xlnx,axi-dma-mm2s-channel";
				dma-channels = <0x1>;
				interrupts = <0 91 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x1>;
			};
			dma-channel@80030030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				dma-channels = <0x1>;
				interrupts = <0 92 4>;
				xlnx,datawidth = <0x80>;
				xlnx,device-id = <0x1>;
			};
		};
		axi_dma_2: dma@80040000 {
			#dma-cells = <1>;
			clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk";
			clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
			compatible = "xlnx,axi-dma-1.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 93 4>;
			reg = <0x0 0x80040000 0x0 0x10000>;
			xlnx,addrwidth = <0x20>;
			dma-channel@80040030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				dma-channels = <0x1>;
				interrupts = <0 93 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x2>;
			};
		};
		axi_dma_3: dma@80050000 {
			#dma-cells = <1>;
			clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk";
			clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
			compatible = "xlnx,axi-dma-1.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 94 4>;
			reg = <0x0 0x80050000 0x0 0x10000>;
			xlnx,addrwidth = <0x20>;
			dma-channel@80050030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				dma-channels = <0x1>;
				interrupts = <0 94 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x3>;
			};
		};
		axi_dma_4: dma@80060000 {
			#dma-cells = <1>;
			clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk";
			clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
			compatible = "xlnx,axi-dma-1.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 95 4>;
			reg = <0x0 0x80060000 0x0 0x10000>;
			xlnx,addrwidth = <0x20>;
			dma-channel@80060030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				dma-channels = <0x1>;
				interrupts = <0 95 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x4>;
			};
		};
		axi_intc_0: interrupt-controller@80020000 {
			#interrupt-cells = <2>;
			compatible = "xlnx,xps-intc-1.00.a";
			interrupt-controller ;
			reg = <0x0 0x80020000 0x0 0x10000>;
			interrupt-parent = <&gic>;
			xlnx,kind-of-intr = <0x0>;
			xlnx,num-intr-inputs = <0xa>;
		};
		custom_ip_0: custom_ip_wrapper@80200000 {
			compatible = "xlnx,Custom_IP_driver";
			interrupt-parent = <&axi_intc_0>;
            		interrupts = <0 0 1 0 1 1 0 2 1 0 3 1 0 4 1 0 5 1 0 6 1 0 7 1 0 8 1 0 9 1>;
			reg = <0x0 0x80200000 0x0 0x200000>;
		};
		misc_clk_0: misc_clk_0 {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <100000000>;
		};
	};
};

 

0 Kudos
Highlighted
Moderator
Moderator
5,406 Views
Registered: ‎04-17-2011

Re: Request irq using AXI Interrupt Controller

DT looks fine. I am aware of an ongoing issue where in the Interrupts are not properly working when connected to AXI INTC and it is further connected to GIC of Zynq. We are working on that and I will update this thread if there are any updates.
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.
----------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Scholar
Scholar
3,045 Views
Registered: ‎06-10-2008

Re: Request irq using AXI Interrupt Controller

We are now 11 months later. Is there any update to this?

0 Kudos
Highlighted
Visitor
Visitor
2,374 Views
Registered: ‎03-10-2011

Re: Request irq using AXI Interrupt Controller

Bump, another N months... Just considering using the AXI Interrupt Controller block in a design and stumbled upon this. Doesn't inspire confidence.

0 Kudos
Highlighted
Scholar
Scholar
2,364 Views
Registered: ‎06-10-2008

Re: Request irq using AXI Interrupt Controller

I believe I saw this was fixed in Petalinux 2018.1. It contains kernel patches related to this. But I advise to try yourself.

 

And yes, very unfortunate that this thread didn't get any updates.

0 Kudos
Highlighted
Visitor
Visitor
904 Views
Registered: ‎06-05-2018

Re: Request irq using AXI Interrupt Controller

We see a similar bug in 2018.3. I2C interrupt conflicts with Ethernet.

Any update?

0 Kudos
Highlighted
Newbie
Newbie
853 Views
Registered: ‎04-06-2019

Re: Request irq using AXI Interrupt Controller

We are now 11 months later. Is there any update to this? CCleaner Happy Wheels VLC

0 Kudos