* 82xx IRQ handling
@ 2005-12-12 2:42 Dmytro Bablinyuk
2005-12-12 5:01 ` Dan Malek
0 siblings, 1 reply; 4+ messages in thread
From: Dmytro Bablinyuk @ 2005-12-12 2:42 UTC (permalink / raw)
To: linuxppc-embedded
Hi everybody,
I am trying to setup an IRQ handler for IRQ4:
#define IRQ SIU_INT_IRQ4
volatile cpm2_map_t *immap;
int irq_flags = 0;
immap = (cpm2_map_t *)CPM_MAP_ADDR;
immap->im_intctl.ic_simrh &= ~(0x0800);
request_irq(IRQ,
&irq_handler, /* our handler */
irq_flags,
"interrupt_test",
NULL);
immap->im_intctl.ic_simrh |= 0x0800;
I can see on a scope that IRQ line pulls up/down but handler get never
called. I am sure I made some very stupid mistake here but I will really
appreciate if somebody can help me with this.
Thank you
Dmytro
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 82xx IRQ handling
2005-12-12 2:42 82xx IRQ handling Dmytro Bablinyuk
@ 2005-12-12 5:01 ` Dan Malek
2005-12-12 6:00 ` Dmytro Bablinyuk
0 siblings, 1 reply; 4+ messages in thread
From: Dan Malek @ 2005-12-12 5:01 UTC (permalink / raw)
To: Dmytro Bablinyuk; +Cc: linuxppc-embedded
On Dec 11, 2005, at 9:42 PM, Dmytro Bablinyuk wrote:
> immap->im_intctl.ic_simrh &= ~(0x0800);
You should not be messing around with this register
in your code. The generic 82xx interrupt functions
will properly manage this for you.
> request_irq(IRQ,
> &irq_handler, /* our handler */
> irq_flags,
> "interrupt_test",
> NULL);
This is all you should do.
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 82xx IRQ handling
2005-12-12 5:01 ` Dan Malek
@ 2005-12-12 6:00 ` Dmytro Bablinyuk
2005-12-12 14:28 ` Kumar Gala
0 siblings, 1 reply; 4+ messages in thread
From: Dmytro Bablinyuk @ 2005-12-12 6:00 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc-embedded
>
>> immap->im_intctl.ic_simrh &= ~(0x0800);
>
>
> You should not be messing around with this register
> in your code. The generic 82xx interrupt functions
> will properly manage this for you.
Thank you Dan,
It's working now!
By the way question - shall I program somewhere an edge of the IRQ or it
always triggers on the rising edge?
Also does anybody knows any source code example of using 82xx General
Purpose Timer Unit so that it triggers interrupt handler after some period.
Thank you
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 82xx IRQ handling
2005-12-12 6:00 ` Dmytro Bablinyuk
@ 2005-12-12 14:28 ` Kumar Gala
0 siblings, 0 replies; 4+ messages in thread
From: Kumar Gala @ 2005-12-12 14:28 UTC (permalink / raw)
To: Dmytro Bablinyuk; +Cc: linuxppc-embedded
On Dec 12, 2005, at 12:00 AM, Dmytro Bablinyuk wrote:
>>> immap->im_intctl.ic_simrh &= ~(0x0800);
>> You should not be messing around with this register
>> in your code. The generic 82xx interrupt functions
>> will properly manage this for you.
> Thank you Dan,
> It's working now!
>
> By the way question - shall I program somewhere an edge of the IRQ
> or it always triggers on the rising edge?
>
> Also does anybody knows any source code example of using 82xx
> General Purpose Timer Unit so that it triggers interrupt handler
> after some period.
The IRQ pins are set to edge trigger by default.
- kumar
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-12-12 14:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-12 2:42 82xx IRQ handling Dmytro Bablinyuk
2005-12-12 5:01 ` Dan Malek
2005-12-12 6:00 ` Dmytro Bablinyuk
2005-12-12 14:28 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).