From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Thirumalai <thirumalai.p@datapatterns.co.in>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: Regarding FPGA based cascaded PIC
Date: Thu, 05 Nov 2009 07:51:22 +1100 [thread overview]
Message-ID: <1257367882.13611.65.camel@pasglop> (raw)
In-Reply-To: <2DA2EE8F96D44EF69D4D8A712410E546@itd210>
On Wed, 2009-11-04 at 18:09 +0530, Thirumalai wrote:
> you understood correctly. Here the problem lies.Correct me if i am wrong. So
> you are telling that irq_of_parse_and_map() will invoke the map/xlate of my
> FPGA pic. Right.
>
> But this is what not happening. Instead of calling my map/xlate functions
> the irq_of_parse_and_map() function is invoking mpic's map/xlate function.
irq_of_parse_and_map() will call the map/xlate function of the parent
PIC for the given interrupt.
In your case, the interrupts you are calling it for are defined as being
interrupts wiring the FPGA to the MPIC, hence are MPIC inputs, and thus
will be parsed/mapped by the MPIC. From the MPIC standpoint, the FPGA is
just a device.
So the code is doing what you tell it to do :-)
I don't understand what you are actually trying to acheive. If those 3
interrupts aren't outputs from the FPGA to the MPIC but input to the
FPGA then they shouldn't be there, they should be device interrupts
connected to the FPGA. Those will end up with map/xlate called in the
FPGA host.
Ben.
> Here is the piece of code that we are using.
>
> fpga_pic_irq_host = irq_alloc_host(pic, IRQ_HOST_MAP_LINEAR,
> DPVPX0659_FPGA_NUM_IRQS,&fpga_pic_host_ops,
> NO_IRQ);
> if (fpga_pic_irq_host == NULL) {
> printk("FPGA PIC: Unable to allocate host\n");
> return;
> }
>
> for (i = 0; i < 3; i++) {
> fpga_irqs[i] = irq_of_parse_and_map(pic, i);
> if (fpga_irqs[i] == NO_IRQ) {
> printk("FPGA PIC: can't get irq %d.\n", i);
> continue;
> }
> printk("interrupt from device tree : %d \n",fpga_irqs[i]);
> set_irq_chained_handler(dpvpx0659_fpga_irqs[i],dpvpx0659_fpga_pic_cascade);
> }
>
>
next prev parent reply other threads:[~2009-11-04 20:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <06737AFD409844ED8DF3D43EFA83A906@itd210>
[not found] ` <1257315924.13611.54.camel@pasglop>
2009-11-04 12:39 ` Regarding FPGA based cascaded PIC Thirumalai
2009-11-04 20:51 ` Benjamin Herrenschmidt [this message]
2009-11-05 2:46 ` thirumalai.p
2009-11-05 3:24 ` Benjamin Herrenschmidt
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=1257367882.13611.65.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=thirumalai.p@datapatterns.co.in \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).