linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Edge Interrupts (Virtex-II Pro)
@ 2005-02-04  2:48 Joshua Lamorie
  2005-02-04 11:31 ` Andrei Konovalov
  0 siblings, 1 reply; 3+ messages in thread
From: Joshua Lamorie @ 2005-02-04  2:48 UTC (permalink / raw)
  To: linuxppc-embedded

Gidday there,

Is there a cleaner way to specify that an interrupt is edge triggered 
other than directly accessing irq_desc_t irq_desc []?

In my module, when I request_irq, if it succeeds I do the following.

      irq_desc[iIRQ].status &= ~(IRQ_LEVEL);

Is there a better way?

Thanks in advance

Joshua

-- 

Xiphos Technologies
(514) 848-9640 x227
(514) 848-9644 fax

www.xiplink.com
_______________________________________________
The information transmitted is intended only for the
person or entity to which it is addressed and may contain
confidential and/or privileged material.  If you have
received this in error, please contact the sender and delete
this communication and any copy immediately. Thank you.

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

* Re: Edge Interrupts (Virtex-II Pro)
  2005-02-04  2:48 Edge Interrupts (Virtex-II Pro) Joshua Lamorie
@ 2005-02-04 11:31 ` Andrei Konovalov
  2005-02-07 20:29   ` Joshua Lamorie
  0 siblings, 1 reply; 3+ messages in thread
From: Andrei Konovalov @ 2005-02-04 11:31 UTC (permalink / raw)
  To: Joshua Lamorie; +Cc: linuxppc-embedded

Joshua Lamorie wrote:
> Gidday there,
> 
> Is there a cleaner way to specify that an interrupt is edge triggered 
> other than directly accessing irq_desc_t irq_desc []?

In case of ML300 (which is the only Virtex-II Pro board in the linux-2.5
tree so far) this is done in platforms/xilinx_ml300.c:ml300_init_irq()
based on XPAR_INTC_0_KIND_OF_INTR value defined in the xparameters.h:

         for (i = 0; i < NR_IRQS; i++) {
                 if (XPAR_INTC_0_KIND_OF_INTR & (0x80000000 >> i))
                         irq_desc[i].status &= ~IRQ_LEVEL;
                 else
                         irq_desc[i].status |= IRQ_LEVEL;
         }

As this code is not board specific at all,
I would move it to arch/ppc/syslib/xilinx_pic.c:ppc4xx_pic_init().
Does it sound reasonable (I'll prepare the patch this weekend then)?

Hmm...
Looks like I've forgotten to change the irq numbering here...
Must be
   if (XPAR_INTC_0_KIND_OF_INTR & (0x00000001 << i))
I think...
Will check.

Thanks,
Andrei

P.S.
Just in case you use 2.4.
2.4 kernel is almost the same to 2.6 in this sense.
But the irq numbering is different.

> In my module, when I request_irq, if it succeeds I do the following.
> 
>      irq_desc[iIRQ].status &= ~(IRQ_LEVEL);
> 
> Is there a better way?
>
> Thanks in advance
> 
> Joshua
> 

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

* Re: Edge Interrupts (Virtex-II Pro)
  2005-02-04 11:31 ` Andrei Konovalov
@ 2005-02-07 20:29   ` Joshua Lamorie
  0 siblings, 0 replies; 3+ messages in thread
From: Joshua Lamorie @ 2005-02-07 20:29 UTC (permalink / raw)
  To: Andrei Konovalov; +Cc: linuxppc-embedded

Andrei Konovalov wrote:

> As this code is not board specific at all,
> I would move it to arch/ppc/syslib/xilinx_pic.c:ppc4xx_pic_init().
> Does it sound reasonable (I'll prepare the patch this weekend then)?

This sounds useful, since I am using a custom developed board using the 
Virtex-II Pro. Unfortunately, the patch wouldn't help me much because I 
am doing my interrupt setup for most of my custom devices within 
modules. You see my hardware has a Virtex-II Pro and a Virtex-II with a 
shared (logically) address space (OPB). I have cascaded interrupt 
controllers (ask me if anyone wants the code). So it is quite often that 
I have a changed hardware and therefore require different drivers. 
Rather than downloading to flash the 700k kernel each time while I am 
developing, I just download the 6k - 20k modules. Then I store them in 
onboard NOR flash.

That's a long way of saying YES, isn't it?

Joshua

-- 

Xiphos Technologies
(514) 848-9640 x227
(514) 848-9644 fax

www.xiplink.com
_______________________________________________
The information transmitted is intended only for the
person or entity to which it is addressed and may contain
confidential and/or privileged material.  If you have
received this in error, please contact the sender and delete
this communication and any copy immediately. Thank you.

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

end of thread, other threads:[~2005-02-07 20:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-04  2:48 Edge Interrupts (Virtex-II Pro) Joshua Lamorie
2005-02-04 11:31 ` Andrei Konovalov
2005-02-07 20:29   ` Joshua Lamorie

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).