UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant igal_kroyter
Participant
3,205 Views
Registered: ‎09-13-2016

Mapping IRQ into device tree value

Jump to solution

Hello,<1 89 4>)

 

 

I am trying to map an IRQ into a device tree system-top.dts on a ZCU-102 evaluation board.

I am actually trying to map PL_PS_GRP0 the first bit (#121 per ug1085 table 13-5).

 

I have subtracted 32 (it is a SPI interrupt) from the index 121 receiving 89.

And added the following lines just following the registers definition:

 

interrupt-parent = <&gic>;
interrupts<0 89 4>
r_irq = platform_get_resource(pdev, IORESOURCE_IRQ,0);

r_irq->start is 218 (Which does not make any sense to me). BTW, I do get interrupts. 

 

Can someone elaborate whether I am doing something wrong.

 

Thanks,

 

Igal

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
5,701 Views
Registered: ‎01-13-2016

Re: Mapping IRQ into device tree value

Jump to solution

Can you elaborate a bit more as to what the issue is? You mention that you are receiving interrupts, so that would imply that your system works as you want, correct?

 

If your question is why the interrupt number is 218, that is normal. The newer Linux kernel (I think after 4.0) no longer directly maps interrupts. So you did right by subtracting the offset from the enumerated index. The reason your interrupt request returns 218 is that Linux now REmaps interrupts to a virtual index, which you can't know in advance. But using platform_get_resource ought to give the proper number.

 

I know it's confusing, and some of Xilinx's documentation hasn't been updated to reflect the change, so there's conflicting information, but if your code works as it stands, you can probably just run with it.

1 Reply
Explorer
Explorer
5,702 Views
Registered: ‎01-13-2016

Re: Mapping IRQ into device tree value

Jump to solution

Can you elaborate a bit more as to what the issue is? You mention that you are receiving interrupts, so that would imply that your system works as you want, correct?

 

If your question is why the interrupt number is 218, that is normal. The newer Linux kernel (I think after 4.0) no longer directly maps interrupts. So you did right by subtracting the offset from the enumerated index. The reason your interrupt request returns 218 is that Linux now REmaps interrupts to a virtual index, which you can't know in advance. But using platform_get_resource ought to give the proper number.

 

I know it's confusing, and some of Xilinx's documentation hasn't been updated to reflect the change, so there's conflicting information, but if your code works as it stands, you can probably just run with it.