Finding Hardware Interrupt Number

View: New views
9 Messages — Rating Filter:   Alert me  

Finding Hardware Interrupt Number

by Fahd Abidi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

X-SpamDetect-Info: ------------- Start ASpam results ---------------
X-SpamDetect-Info: This message may be spam. This message BODY has been altered to show you the spam information
X-SpamDetect: *****: 5.600000 DodgySource=2.0, SPF Default Fail=2.5, Some tags-to-text=0.5, X-Verify-SMTP present=0.6
X-SpamDetect-Info: ------------- End ASpam results -----------------

Hello,
 
I am wondering if some one can point me in the right direction. We have a platform where we are using Interrupt Pin 5 on our coldfire MCF5275, we are running a UCLinux kernel 2.4 and I am trying to figure out which IRQ number in the kernel maps to Hardware Interrupt 5? Is there an easy way to figure this out?
 
Thanks,
 

Fahd Abidi
Sr. Field Application Engineer
Ultimate Solutions, Inc.
================================================================

coldfire@... Send a post to the list. coldfire-join@... Join the list. coldfire-digest@... Join the list in digest mode. coldfire-leave@... Leave the list.

Re: Finding Hardware Interrupt Number

by Marc Vincent-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Not familiar with uCLinux' mapping, but I would imagine it aligns its
vectors to the hardware's. EPF5 is source 5 for interrupt controller
0, so the hardware vector is 0x45. Hope this helps.

On Mon, Jun 9, 2008 at 11:22 AM, Fahd Abidi <fabidi@...> wrote:
> I am wondering if some one can point me in the right direction. We have a
> platform where we are using Interrupt Pin 5 on our coldfire MCF5275, we are
> running a UCLinux kernel 2.4 and I am trying to figure out which IRQ number
> in the kernel maps to Hardware Interrupt 5? Is there an easy way to figure
> this out?
---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.


Re: Finding Hardware Interrupt Number

by Greg Ungerer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Fahd,

Fahd Abidi wrote:
> I am wondering if some one can point me in the right direction. We have
> a platform where we are using Interrupt Pin 5 on our coldfire MCF5275,
> we are running a UCLinux kernel 2.4 and I am trying to figure out which
> IRQ number in the kernel maps to Hardware Interrupt 5? Is there an easy
> way to figure this out?

The IRQ number that you pass to request_irq() in uClinux is the
vector number. So figure out what vector number GPIO5 interrupts on
and use that.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@...
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.


Re: Finding Hardware Interrupt Number

by Allon Stern :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jun 11, 2008, at 2:49 AM, Greg Ungerer wrote:

> Hi Fahd,
>
> Fahd Abidi wrote:
>> I am wondering if some one can point me in the right direction. We  
>> have a platform where we are using Interrupt Pin 5 on our coldfire  
>> MCF5275, we are running a UCLinux kernel 2.4 and I am trying to  
>> figure out which IRQ number in the kernel maps to Hardware  
>> Interrupt 5? Is there an easy way to figure this out?
>
> The IRQ number that you pass to request_irq() in uClinux is the
> vector number. So figure out what vector number GPIO5 interrupts on
> and use that.

One potential gotcha - at least it got me on the 5282; I don't know  
how this maps to the 5275:
I had to set up the hardware to enable interrupts on the IRQ line  
(EPIER register) and unmask the interrupt (IMRL register).

Once those were done, I could request_irq.
In my linux environment (2.6), the interrupt# was IH_GPIO_BASE+4 (for  
IRQ pin 4)

Hope this helps.
-
allon
---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.


Re: Finding Hardware Interrupt Number

by Allon Stern :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jun 11, 2008, at 11:34 AM, Allon Stern wrote:

> In my linux environment (2.6), the interrupt# was IH_GPIO_BASE+4  
> (for IRQ pin 4)

Whoops, that was on the OMAP. Dang #ifdefs!

On the Coldfire, it was 64+7 for IRQ pin 7.  Sorry for any confusion.

-
allon
---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.


Parent Message unknown RE: Finding Hardware Interrupt Number

by Fahd Abidi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looking at include/asm-m68knommu/m527xsim.h the ICR base is set to 0x40.
And since I am using IRQ pin 5 this would mean that interrupt vector
would be 0x45? I think. Which is 69, this matched what Marc has
mentioned and also seems to match your IRQ offsets, so I mmight have it.
I'm still new to this and learning.

Thanks for all the help!

Fahd Abidi

-----Original Message-----
From: coldfire-bounce@... [mailto:coldfire-bounce@...]
On Behalf Of Allon Stern
Sent: Wednesday, June 11, 2008 12:01 PM
To: Fahd Abidi
Subject: Re: [ColdFire] Finding Hardware Interrupt Number


On Jun 11, 2008, at 11:34 AM, Allon Stern wrote:

> In my linux environment (2.6), the interrupt# was IH_GPIO_BASE+4 (for
> IRQ pin 4)

Whoops, that was on the OMAP. Dang #ifdefs!

On the Coldfire, it was 64+7 for IRQ pin 7.  Sorry for any confusion.

-
allon
---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.



---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.


Parent Message unknown RE: Finding Hardware Interrupt Number

by Fahd Abidi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well looks like all is not working as expected. I checked the hardware
and see the interrupts trigger on Interrupt Pin 5 using an oscope
measuring the resistor connected to that pin. I fired 5 interrupts just
to be sure and can capture them on the oscopse how ever I don't see the
interrupts trigger in the kernel:

# cat /proc/interrupts          
 69:          0   MCP2515
 77:       7528   ColdFire UART    
Starting
 78:          0   ColdFire UART
d.en
.
.
.
.

Interrupt 69 did not trigger as shown above. I assumed that the all the
interrupt sources should be enabled in the uClinux kernel, is this
correct to assume? Or do I need to modify the kernel to enable disable
the interrupt thru the interrupt mask register? Does any one know where
this needs to be done, or if it needs to be done?

Thanks,

Fahd Abidi


-----Original Message-----
From: coldfire-bounce@... [mailto:coldfire-bounce@...]
On Behalf Of Fahd Abidi
Sent: Wednesday, June 11, 2008 1:01 PM
To: Fahd Abidi
Subject: RE: [ColdFire] Finding Hardware Interrupt Number

Looking at include/asm-m68knommu/m527xsim.h the ICR base is set to 0x40.
And since I am using IRQ pin 5 this would mean that interrupt vector
would be 0x45? I think. Which is 69, this matched what Marc has
mentioned and also seems to match your IRQ offsets, so I mmight have it.
I'm still new to this and learning.

Thanks for all the help!

Fahd Abidi

-----Original Message-----
From: coldfire-bounce@... [mailto:coldfire-bounce@...]
On Behalf Of Allon Stern
Sent: Wednesday, June 11, 2008 12:01 PM
To: Fahd Abidi
Subject: Re: [ColdFire] Finding Hardware Interrupt Number


On Jun 11, 2008, at 11:34 AM, Allon Stern wrote:

> In my linux environment (2.6), the interrupt# was IH_GPIO_BASE+4 (for
> IRQ pin 4)

Whoops, that was on the OMAP. Dang #ifdefs!

On the Coldfire, it was 64+7 for IRQ pin 7.  Sorry for any confusion.

-
allon
---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.



---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.




---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.


Re: Finding Hardware Interrupt Number

by Allon Stern :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jun 12, 2008, at 4:14 PM, Fahd Abidi wrote:

Interrupt 69 did not trigger as shown above. I assumed that the all the
interrupt sources should be enabled in the uClinux kernel, is this
correct to assume? Or do I need to modify the kernel to enable disable
the interrupt thru the interrupt mask register? Does any one know where
this needs to be done, or if it needs to be done?

As I noted in my earlier email, I did need to do this on the 5282.
My code looks like this (NOTE: ON 5282!)

    /* We have to set up the edge port module to source interrupts from the IRQ line */
    *MCF5282_EPORT_EPIER = 0xFE;   // bit #7; enable interrupts on IRQ 7
    *(u32 *)(MCF5282_INTC0+MCFINTC_IMRL) &= ~0x00000080; // unmask IRQ7 interrupt

HTH.
-
allon
coldfire@... Send a post to the list. coldfire-join@... Join the list. coldfire-digest@... Join the list in digest mode. coldfire-leave@... Leave the list.

Re: Finding Hardware Interrupt Number

by Kurt Mahan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Have you setup the EPORT regs?  The first 7 ints are EPORT ints that
usually require a little more configuration than just registering for
the int.

Just a thought.

--Kurt

Fahd Abidi wrote:

> Well looks like all is not working as expected. I checked the hardware
> and see the interrupts trigger on Interrupt Pin 5 using an oscope
> measuring the resistor connected to that pin. I fired 5 interrupts just
> to be sure and can capture them on the oscopse how ever I don't see the
> interrupts trigger in the kernel:
>
> # cat /proc/interrupts          
>  69:          0   MCP2515
>  77:       7528   ColdFire UART    
> Starting
>  78:          0   ColdFire UART
> d.en
> .
> .
> .
> .
>
> Interrupt 69 did not trigger as shown above. I assumed that the all the
> interrupt sources should be enabled in the uClinux kernel, is this
> correct to assume? Or do I need to modify the kernel to enable disable
> the interrupt thru the interrupt mask register? Does any one know where
> this needs to be done, or if it needs to be done?
>
> Thanks,
>
> Fahd Abidi
>
>
> -----Original Message-----
> From: coldfire-bounce@... [mailto:coldfire-bounce@...]
> On Behalf Of Fahd Abidi
> Sent: Wednesday, June 11, 2008 1:01 PM
> To: Fahd Abidi
> Subject: RE: [ColdFire] Finding Hardware Interrupt Number
>
> Looking at include/asm-m68knommu/m527xsim.h the ICR base is set to 0x40.
> And since I am using IRQ pin 5 this would mean that interrupt vector
> would be 0x45? I think. Which is 69, this matched what Marc has
> mentioned and also seems to match your IRQ offsets, so I mmight have it.
> I'm still new to this and learning.
>
> Thanks for all the help!
>
> Fahd Abidi
>
> -----Original Message-----
> From: coldfire-bounce@... [mailto:coldfire-bounce@...]
> On Behalf Of Allon Stern
> Sent: Wednesday, June 11, 2008 12:01 PM
> To: Fahd Abidi
> Subject: Re: [ColdFire] Finding Hardware Interrupt Number
>
>
> On Jun 11, 2008, at 11:34 AM, Allon Stern wrote:
>
>  
>> In my linux environment (2.6), the interrupt# was IH_GPIO_BASE+4 (for
>> IRQ pin 4)
>>    
>
> Whoops, that was on the OMAP. Dang #ifdefs!
>
> On the Coldfire, it was 64+7 for IRQ pin 7.  Sorry for any confusion.
>
> -
> allon
> ---
> coldfire@...              Send a post to the list.
> coldfire-join@...        Join the list.
> coldfire-digest@...    Join the list in digest mode.
> coldfire-leave@...     Leave the list.
>
>
>
> ---
> coldfire@...              Send a post to the list.
> coldfire-join@...        Join the list.
> coldfire-digest@...    Join the list in digest mode.
> coldfire-leave@...     Leave the list.
>
>
>
>
> ---
> coldfire@...              Send a post to the list.
> coldfire-join@...        Join the list.
> coldfire-digest@...    Join the list in digest mode.
> coldfire-leave@...     Leave the list.
>
>  

---
coldfire@...              Send a post to the list.
coldfire-join@...        Join the list.
coldfire-digest@...    Join the list in digest mode.
coldfire-leave@...     Leave the list.