<div> </div>
<div>Hi</div>
<div> </div>
<div>i have a FPGA called mcmc which is connected to the powerpc mpc8572 on the local bus. It provides 2 interrupts which are connected to the</div>
<div>external interupts IRQ1 and IRQ3 of the mpc8572.</div>
<div>the fpga is memory mapped on the local bus at address <font face="Courier New">0xc0000000 </font></div>
<div>I am able to register the interrupt and obtain virq , but no interrupts.</div>
<div>is the modifications made in the dts file enought/right for getting an external interrupt??</div>
<div> </div>
<div> </div>
<div><strong>The modified dts file for enrm8572</strong></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">localbus@e0005000 {</font></div>
<div><font face="courier new,monospace"> </font></div>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<div><font face="courier new,monospace">#address-cells = <2>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">#size-cells = <1>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">compatible = "fsl,mpc8572-elbc", "fsl,elbc", "simple-bus";</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">reg = <0xe0005000 0x1000>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">interrupts = <19 2>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">interrupt-parent = <&mpic>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">ranges = <0x0 0x0 0xfc000000 0x04000000</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">0x1 0x0 0xc0000000 0x00080000</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">0x2 0x0 0x90100000 0x00008000</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">0x3 0x0 0x90000000 0x00040000</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">0x4 0x0 0x91000000 0x00008000>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">nand@3,0 {</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">#address-cells = <1>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">#size-cells = <1>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">compatible = "fsl,mpc8572-fcm-nand",</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">"fsl,elbc-fcm-nand";</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">reg = <0x3 0x0 0x40000>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">u-boot@0 {</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">reg = <0x0 0x02000000>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">read-only;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">};</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">jffs2@2000000 {</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">reg = <0x02000000 0x10000000>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">};</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">ramdisk@12000000 {</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">reg = <0x12000000 0x08000000>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">read-only;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">};</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">kernel@1a000000 {</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">reg = <0x1a000000 0x04000000>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">};</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">dtb@1e000000 {</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">reg = <0x1e000000 0x01000000>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">read-only;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">};</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">empty@1f000000 {</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">reg = <0x1f000000 0x21000000>;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">};</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">};</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace"> </font></div>
<div><strong><font style="BACKGROUND-COLOR: #ffff33" face="courier new,monospace">mcmc@1,0 {</font></strong></div>
<div><strong><font style="BACKGROUND-COLOR: #ffff33" face="courier new,monospace"> </font></strong></div>
<div><strong><font style="BACKGROUND-COLOR: #ffff33" face="courier new,monospace">compatible = "fsl,fpga-pixis";</font></strong></div>
<div><strong><font style="BACKGROUND-COLOR: #ffff33" face="courier new,monospace"> </font></strong></div>
<div><strong><font style="BACKGROUND-COLOR: #ffff33" face="courier new,monospace">reg = <1 0 32>;</font></strong></div>
<div><strong><font style="BACKGROUND-COLOR: #ffff33" face="courier new,monospace"> </font></strong></div>
<div><strong><font style="BACKGROUND-COLOR: #ffff33" face="courier new,monospace">interrupts = <1 1 3 1>;</font></strong></div>
<div><strong><font style="BACKGROUND-COLOR: #ffff33" face="courier new,monospace"> </font></strong></div>
<div><strong><font style="BACKGROUND-COLOR: #ffff33" face="courier new,monospace">interrupt-parent = <&mpic>;</font></strong></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">};</font></div></blockquote>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">};</font></div>
<div> </div>
<div><strong>code for registering the interrupt :</strong></div>
<div> </div>
<div><font face="courier new,monospace">np = of_find_compatible_node(NULL, NULL, "fsl,fpga-pixis");</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">mcmc_irq = irq;</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">virq = irq_of_parse_and_map(np, mcmc_irq);</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">if(virq == NO_IRQ){</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">printk(KERN_ERR "mcmc: failed to map interrupt");</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">}</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">printk(KERN_INFO "mcmc: interrupt mapped to virq %d\n", virq);</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">ret = request_irq(virq, mcmc_interrupt, IRQF_DISABLED,"mcmc", NULL);</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">if(ret){</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">printk(KERN_INFO "mcmc : cant get assigned irq %i\n errno : <%d>\n",mcmc_irq,ret);</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">}</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">else{</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">printk(KERN_ALERT "Interrupt requested OK\n");</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">}</font></div>
<div> </div>
<div>d :</div>
<div> </div>
<div><strong>when i register the driver the following output is obtaine</strong></div>
<div> </div>
<div><strong>for irq=1</strong></div>
<div> </div>
<div><font face="courier new,monospace">irq_of_parse_and_map</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">irq : irq_create_mapping(0xc0fffb40,0x1)</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">irq : using host @ c0fffb40</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">irq : obtained virq 18</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">irq : virq=12 <6>mcmc : interrupt mapped to irq 18</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">Interrupt requested OK!</font></div>
<div> </div>
<div><strong>for irq=0</strong></div>
<div> </div>
<div><font face="courier new,monospace">irq_of_parse_and_map</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">irq : irq_create_mapping(0xc0fffb40,0x3)</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">irq : using host @ c0fffb40</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">irq : obtained virq 20</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">irq : virq=14 <6>mcmc : interrupt mapped to irq 20</font></div>
<div><font face="courier new,monospace"> </font></div>
<div><font face="courier new,monospace">Interrupt requested OK!</font></div>
<div><font face="courier new,monospace"> </font></div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div>--</div>
<div>Cheeers</div>
<div> </div>
<div>Deebul !!!!!!</div>
<div> </div>
<div> </div>