The failure referes to setup_irq :<br>
desc->chip == &no_irq_chip is true<br>
<br>
What is irq_desc and how can I initialize it ?<br>
<br>
<br>
setup_irq(unsigned int irq, struct irqaction *new)<br>
{<br>
struct irq_desc *desc = irq_desc + irq;<br>
struct irqaction *old, **p;<br>
const char *old_name = NULL;<br>
unsigned long flags;<br>
int shared = 0;<br>
<br>
if (irq >= NR_IRQS)<br>
return -EINVAL;<br>
<br>
printk("desc\n");<br>
if (desc->chip == &no_irq_chip)<br>
return -ENOSYS;<br>
printk("desc2\n");<br><br><div><span class="gmail_quote">2008/9/3, Daniele Bosi <<a href="mailto:d.bosi@selcomgroup.com">d.bosi@selcomgroup.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Try to set some flag into the third parameter of the request_irq()<br> function like:<br> <br> SA_SHIRQ Interrupt is shared<br> <br> SA_INTERRUPT Disable local interrupts while processing<br> <br>
SA_SAMPLE_RANDOM The interrupt can be used for entropy<br> <br> otherwise try to use the function install_irq_handler()<br> <br> <br> bye Daniele<br> <br> <br> <br> Sébastien Chrétien ha scritto:<br> <br>> Hello,<br>
><br> > I am trying to register a function writh IRQ :<br> ><br> > static irqreturn_t uart_test (int irq , void *dev_id)<br> > {<br> > printk("/!\\ Interruption : tx_empty\n");<br> > return IRQ_HANDLED;<br>
> }<br> ><br> > req=request_irq(0x18,uart_test,NULL,"uart_test",NULL);<br> > printk("Initialisation IRQ UART : %d \n", req);<br> ><br> > When I boot linux ppc, the req value is -38.<br>
> What is wrong ?<br> <br>> ------------------------------------------------------------------------<br> ><br> > _______________________________________________<br> > Linuxppc-dev mailing list<br> > <a href="mailto:Linuxppc-dev@ozlabs.org">Linuxppc-dev@ozlabs.org</a><br>
> <a href="https://ozlabs.org/mailman/listinfo/linuxppc-dev">https://ozlabs.org/mailman/listinfo/linuxppc-dev</a><br> <br> --<br> <br> <br> ------------------------------------------------------------------------<br> <br>
<br> Daniele Bosi<br> <br> *DIGITEK S.p.A.*<br> <br> Via L. Romagnoli 24,<br> 41033 Concordia sulla Secchia<br> Modena (MO), Italy<br> <br> *Tel*: +39-(0)53556942 Fax. +39-(0)53554550<br> <br> *Web: * <a href="http://www.digitek.it">http://www.digitek.it</a><br>
<br> *Mail to:* <a href="mailto:d.bosi@selcomgroup.com">d.bosi@selcomgroup.com</a> <mailto:<a href="mailto:d.bosi@selcomgroup.com">d.bosi@selcomgroup.com</a>><br> <br> </blockquote></div><br>