<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial" size="2"><span style="font-size:10pt;">
<div> </div>
<div>Hi Scott,</div>
<div> </div>
<div> I try to request an IRQ (IRQ2 and IRQ3 which are ineterrupt no 20 and 21 in mpc8247)in my driver . The</div>
<div>Call fails in setup_irq in Manage.c at /kernel/irq. </div>
<div> </div>
<div>Setup _irq returns -ENOSYS</div>
<div> </div>
<div><font color="red">if (desc->irq_data.chip == &no_irq_chip)</font></div>
<div><font color="red">                 return -ENOSYS;</font></div>
<div><font color="blue"> </font></div>
<div><font color="blue"> </font></div>
<div><font color="blue">I found that I need to pass the virtual interrupt number instead of hardware interrupt number. </font></div>
<div><font color="blue">So I added below piece of code </font></div>
<div><font color="blue"> </font></div>
<div>Below is the call to request irq in my driver. </div>
<div><font color="blue"> </font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;">virq = irq_create_mapping(NULL, CPLD1_INTERRUPT); </span></font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;">        </span></font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;"> </span></font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;"> </span></font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;">        </span></font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;">   if ((ret = request_irq(virq,cpld_irq_handler, 0, GPIO_CHAR_PATH, NULL))!=0)</span></font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;">   {</span></font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;">      printk(KERN_ERR "gpio_init: Could not grab IRQ line for CPLD ret = %d\n",ret);</span></font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;">          goto err1;</span></font></div>
<div><font face="Courier New" size="2"><span style="font-size:9pt;">   }</span></font></div>
<div><font face="Courier New" size="2" color="blue"><span style="font-size:9pt;"> </span></font></div>
<div><font color="blue"> </font></div>
<div><font color="blue">Now it fails in <font face="Courier New" size="2" color="black"><span style="font-size:9pt;"><b>irq_create_mapping</b></span></font><b>   with NO_IRQ error.</b></font></div>
<div><font color="blue"> </font></div>
<div><font color="blue"><b>if (controller == NULL)</b></font></div>
<div><font color="blue">                <b>host = irq_default_host;</b></font></div>
<div><font color="blue"><b>else</b></font></div>
<div><font color="blue">                <b>host = irq_find_host(controller);</b></font></div>
<div><font color="blue">if (host == NULL) {</font></div>
<div><font color="blue">                printk(KERN_WARNING "irq: no irq host found for %s !\n",</font></div>
<div><font color="blue">                       controller->full_name);</font></div>
<div><font color="blue">                return <font color="red">NO_IRQ</font>;</font></div>
<div><font color="blue">        }</font></div>
<div><font color="blue"> </font></div>
<div><font color="blue"> </font></div>
<div>I just don't know what I should pass for host , also when I pass NULL for host . I see the default host is NULL..</div>
<div>Could you please help me. My project delivery is near , I need  help soon.</div>
<div> </div>
<div> </div>
<div>Regards,</div>
<div>Smitha</div>
<div><font color="red"> </font></div>
<div><font color="red"> </font></div>
</span></font>
<P><strong><span style='font-size:10.0pt;font-family:
"Palatino Linotype","serif";color:green'> Please do not print this email unless it is absolutely necessary. </span></strong><span style='font-family:"Arial","sans-serif"'><o:p></o:p></span></p>


<p> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. </p>

<p>WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. </p>
<p>
www.wipro.com
</p>
</body>
</html>