Howto access IRQ0 on a LS1046a

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Howto access IRQ0 on a LS1046a

1,639 Views
sreeragag
Contributor II

Hi all,

we're running a LS1046A based custom board and have to use (so far) external IRQ0 that should, according to the ref manual, be accessible at 163 of the GIC. We have the following entry in our dts (inside the existing "&ifc { ... };"  section):

We try with external interrupt to the IRQ0 , no interrupt shown in /proc/interrupts for the external interrupt. What is missing for  IRQ0 in LS1046A ?  

cpld: board-control@2,0 {
    compatible = "fsl,ls1046ardb-cpld";
    reg = <0x2 0x0 0x0010000>;
    interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_LOW>;
    interrupt-parent = <&gic>;
    status = "okay";
};

Labels (1)
0 Kudos
Reply
2 Replies

1,452 Views
sreeragag
Contributor II

Got it! We have added a device driver for cpld and added interrupt handling in it. Now it works.

Registered irq request in init function

struct device_node *node = of_find_node_by_name(NULL, "board-control");

irqNum = of_irq_to_resource(node, 0, &resource);

result = request_irq(irqNum, (irq_handler_t) irq5_handler, IRQF_TRIGGER_RISING, "irq0_handler", NULL);

In interrupt handler function irq5_handler ISR added.

static irq_handler_t irq5_handler(unsigned int irq, void *dev_id, struct pt_regs *regs) {

   // ISR here

}

0 Kudos
Reply

1,347 Views
Gyosun
Contributor III

Hi Sreeragag,

We are testing with the same issue as you.

However, when insmod is executed, kernel panic occurs.

Related questions have been posted on the link below.

https://community.nxp.com/t5/QorIQ/LS1046-IRQ1-Interrupt-Error/m-p/1234303#M10071 

I need help..

Thank you,

Best Regards,

Gyosun.

0 Kudos
Reply