Linux MIPS Architecture development
 help / color / mirror / Atom feed
* is cp0 interrupt infrastructure sufficient..?
@ 2003-11-17 11:40 ashish  anand
  2003-11-17 13:19 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: ashish  anand @ 2003-11-17 11:40 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/html, Size: 1285 bytes --]

[-- Attachment #2: Type: text/plain, Size: 937 bytes --]

I have a generic question regarding interrupt controler functionality 
integrated in CP0 on mips architecture.
I don't see any interface to configure the edge/level triggering settings.

though in our BSP we take care of handling spurious interrupts , but is
this designed to be like that..?

I mean to ask , suppose I want to add a edge triggering peripheral 
, to the extent of my understanding this will certainly generate the
spurious interrupts when coupled with a level triggering configuration 
in CP0 (by default..?).

if i am handling through CP0_CAUSE or any other register inspection
that can work but I am loosing so many valid interupts which would have been really valid with edge trigger pin of interrupt controller  .
further this type of handling is valid for actual spurious interrupts 
not for those who are certain to be fired because of edge/level mismatching.

Best Regards,
Ashish Anand





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: is cp0 interrupt infrastructure sufficient..?
  2003-11-17 11:40 is cp0 interrupt infrastructure sufficient..? ashish  anand
@ 2003-11-17 13:19 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2003-11-17 13:19 UTC (permalink / raw)
  To: ashish anand; +Cc: linux-mips

On Mon, Nov 17, 2003 at 11:40:11AM -0000, ashish  anand wrote:

> I have a generic question regarding interrupt controler functionality 
> integrated in CP0 on mips architecture.
> I don't see any interface to configure the edge/level triggering settings.

MIPS only supports level triggered interrupts in coprocessor 0.

> though in our BSP we take care of handling spurious interrupts , but is
> this designed to be like that..?

There is no handling needed.  If the processor takes an interrupt but none
of the interrupt bits in c0_status is set, just return.  That's a legal
condition.

> I mean to ask , suppose I want to add a edge triggering peripheral.
> to the extent of my understanding this will certainly generate the
> spurious interrupts when coupled with a level triggering configuration 
> in CP0 (by default..?).

You can directly sample the level of the edge irq in the interrupt bits in
the cause register.  But that seems a fragile approach.

> if i am handling through CP0_CAUSE or any other register inspection
> that can work but I am loosing so many valid interupts which would have
> been really valid with edge trigger pin of interrupt controller  .
> further this type of handling is valid for actual spurious interrupts 
> not for those who are certain to be fired because of edge/level mismatching.

If you really need to use an edge triggered interrupt on a MIPS then you
probably want to use some circuit interrupt controller that converts the
edge to a level triggered interrupt.  

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-17 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-17 11:40 is cp0 interrupt infrastructure sufficient..? ashish  anand
2003-11-17 13:19 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox