Skip to content
Advertisement

IRQCHIP_DECLARE: init function is not being run

I am trying to use the Xilinx interrupt controller driver in an embedded ARM FPGA system I am developing. (https://github.com/torvalds/linux/blob/master/drivers/irqchip/irq-xilinx-intc.c)

At the end of this driver is the line:

IRQCHIP_DECLARE(xilinx_intc_xps, "xlnx,xps-intc-1.00.a", xilinx_intc_of_init);

I have added an entry in my device tree for the interrupt controller.

JavaScript

However, from what I can tell, the xilinx_intc_of_init function is never called during startup. I added a pr_info at the beginning of the function, but I never see it called.

The only message that seems to indicate an issue is:

[ 0.177772] irq: no irq domain found for /amba/xil_intc@41810000 !

I have successfully written and compiled other device drivers, added entries in the device tree, and had them load up and show in dmesg, but for some reason I can’t get this one to work.

Any suggestions on debugging this?

For what it’s worth, I’m compiling the driver into a kernel module, installing using modules_install and have added an entry to /etc/modules to load it on startup.

Edit: I am using a 4.6 kernel.

Advertisement

Answer

JavaScript

The driver irq-xilinx-intc.c is using the above call to register with the irq subsystem.

If irq driver uses IRQCHIP_DECLARE macro it will follow the below sequence to invoke the xilinx_intc_of_init() (callback function)

JavaScript

If The Driver was registered using IRQCHIP_DECLARE it must be compiled into the kernel and the callback function will be invoked at kernel boot time.

It doesn’t work as kernel modules/overlay like other device drivers.

Advertisement