irq

Sébastien Chrétien sebastien.chretien.enseirb at gmail.com
Thu Sep 4 01:03:46 EST 2008


The failure referes to setup_irq :
desc->chip == &no_irq_chip is true

What is irq_desc and how can I initialize it ?


setup_irq(unsigned int irq, struct irqaction *new)
{
    struct irq_desc *desc = irq_desc + irq;
    struct irqaction *old, **p;
    const char *old_name = NULL;
    unsigned long flags;
    int shared = 0;

    if (irq >= NR_IRQS)
        return -EINVAL;

    printk("desc\n");
    if (desc->chip == &no_irq_chip)
        return -ENOSYS;
    printk("desc2\n");

2008/9/3, Daniele Bosi <d.bosi at selcomgroup.com>:
>
> Try to set some flag into the third parameter of the request_irq()
> function like:
>
> SA_SHIRQ                Interrupt is shared
>
> SA_INTERRUPT            Disable local interrupts while processing
>
> SA_SAMPLE_RANDOM        The interrupt can be used for entropy
>
> otherwise try to use the function install_irq_handler()
>
>
> bye Daniele
>
>
>
> Sébastien Chrétien ha scritto:
>
> > Hello,
> >
> > I am trying to register a function writh IRQ :
> >
> > static irqreturn_t uart_test (int irq , void *dev_id)
> > {
> >     printk("/!\\ Interruption : tx_empty\n");
> >        return IRQ_HANDLED;
> > }
> >
> >     req=request_irq(0x18,uart_test,NULL,"uart_test",NULL);
> >     printk("Initialisation IRQ UART : %d \n", req);
> >
> > When I boot linux ppc, the req value is -38.
> > What is wrong ?
>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev at ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
> --
>
>
> ------------------------------------------------------------------------
>
>
>   Daniele Bosi
>
> *DIGITEK S.p.A.*
>
> Via L. Romagnoli 24,
> 41033 Concordia sulla Secchia
> Modena (MO), Italy
>
> *Tel*: +39-(0)53556942 Fax. +39-(0)53554550
>
> *Web:    * http://www.digitek.it
>
> *Mail to:* d.bosi at selcomgroup.com <mailto:d.bosi at selcomgroup.com>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080903/68162ecf/attachment.htm>


More information about the Linuxppc-dev mailing list