From: Andrei Konovalov <akonovalov@ru•mvista.com>
To: Joshua Lamorie <jpl@xiphos•ca>
Cc: linuxppc-embedded@ozlabs•org
Subject: Re: Edge Interrupts (Virtex-II Pro)
Date: Fri, 04 Feb 2005 14:31:51 +0300 [thread overview]
Message-ID: <42035D27.50901@ru.mvista.com> (raw)
In-Reply-To: <4202E286.1010206@xiphos.ca>
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
>
next prev parent reply other threads:[~2005-02-04 11:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-04 2:48 Edge Interrupts (Virtex-II Pro) Joshua Lamorie
2005-02-04 11:31 ` Andrei Konovalov [this message]
2005-02-07 20:29 ` Joshua Lamorie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42035D27.50901@ru.mvista.com \
--to=akonovalov@ru$(echo .)mvista.com \
--cc=jpl@xiphos$(echo .)ca \
--cc=linuxppc-embedded@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox