external irq pins in mpc8349 mds

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

external irq pins in mpc8349 mds

Jump to solution
984 Views
rans
Senior Contributor I

Hello,

I need to use external irq as interrupt,

and I wanted to debug pin to verify that the interrupt is given to mpc8xxx,

What is the mapping between IRQ 0-7 to pins on Soc ? I couldn't understand it from datasheet.

Regards,

Ran

0 Kudos
1 Solution
828 Views
r8070z
NXP Employee
NXP Employee

Now it seems I see what you mean. Let I refer on to 2 answers which cover that topic. First is

Linux IRQ numbers, as used by request_irq() and similar functions, are arbitrary software tokens rather than hardware IRQ numbers.  To obtain such a token (called a virtual IRQ number, or virq) you need to create a mapping.  The most common way to do that is to either use irq_of_parse_and_map(), or get the virq from a bus-specific structure (e.g. struct pci_dev or struct platform_device).

irq_create_mapping() is the low-level function used by the above methods of translation.  It's possible to use it directly, but you normally shouldn't have to.  If you find yourself wanting to use it, it probably means that you have hardware that should be described in the device tree but isn't.

irq_find_mapping() is one method used by interrupt controller drivers to turn a hardware interrupt number into a virq using an existing mapping.  If you're not writing an interrupt controller driver or something similar, you don't need this.

View solution in original post

0 Kudos
4 Replies
828 Views
r8070z
NXP Employee
NXP Employee

What do you mean as “the mapping between IRQ 0-7 to pins on Soc”?

0 Kudos
828 Views
rans
Senior Contributor I

Hi r8070z,

Thank you for the assistance.

I might be mistaked here, I understood from HW staff that there should be software mapping between the external pin which gets into powerpc, to the logic IRQ number ? Is this correct ?

According to our requirement we need to get interrupt from IRQ #4 , I have registered on IRQ #4 and got success on irq_request in driver, but the routine interrupt handler is not called. Is there somw way to debug this issue ?

Thank you very much,

Ran

0 Kudos
829 Views
r8070z
NXP Employee
NXP Employee

Now it seems I see what you mean. Let I refer on to 2 answers which cover that topic. First is

Linux IRQ numbers, as used by request_irq() and similar functions, are arbitrary software tokens rather than hardware IRQ numbers.  To obtain such a token (called a virtual IRQ number, or virq) you need to create a mapping.  The most common way to do that is to either use irq_of_parse_and_map(), or get the virq from a bus-specific structure (e.g. struct pci_dev or struct platform_device).

irq_create_mapping() is the low-level function used by the above methods of translation.  It's possible to use it directly, but you normally shouldn't have to.  If you find yourself wanting to use it, it probably means that you have hardware that should be described in the device tree but isn't.

irq_find_mapping() is one method used by interrupt controller drivers to turn a hardware interrupt number into a virq using an existing mapping.  If you're not writing an interrupt controller driver or something similar, you don't need this.

0 Kudos
828 Views
rans
Senior Contributor I

Thank you very much for the assistance,

Ran

0 Kudos