From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232]) by ozlabs.org (Postfix) with ESMTP id 197FDDE0A6 for ; Thu, 4 Sep 2008 01:03:47 +1000 (EST) Received: by rv-out-0506.google.com with SMTP id f6so3072813rvb.9 for ; Wed, 03 Sep 2008 08:03:46 -0700 (PDT) Message-ID: <319b0ac50809030803p6d659468wd7d2425224653374@mail.gmail.com> Date: Wed, 3 Sep 2008 17:03:46 +0200 From: "=?ISO-8859-1?Q?S=E9bastien_Chr=E9tien?=" To: linuxppc-dev@ozlabs.org Subject: Re: irq In-Reply-To: <48BEA106.9090307@selcomgroup.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_29996_1129382.1220454226270" References: <319b0ac50809030715h1a03a606jacddd400019f4483@mail.gmail.com> <48BEA106.9090307@selcomgroup.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , ------=_Part_29996_1129382.1220454226270 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline The failure referes to setup_irq : desc->chip =3D=3D &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 =3D irq_desc + irq; struct irqaction *old, **p; const char *old_name =3D NULL; unsigned long flags; int shared =3D 0; if (irq >=3D NR_IRQS) return -EINVAL; printk("desc\n"); if (desc->chip =3D=3D &no_irq_chip) return -ENOSYS; printk("desc2\n"); 2008/9/3, Daniele Bosi : > > 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=E9bastien Chr=E9tien 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=3Drequest_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@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@selcomgroup.com > > ------=_Part_29996_1129382.1220454226270 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline The failure referes to setup_irq :
desc->chip =3D=3D &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 =3D irq_desc + irq;
    struct irqaction *old, **p;
    const char *old_name =3D NULL;
    unsigned long flags;
    int shared =3D 0;

    if (irq >=3D NR_IRQS)
        return -EINVAL;

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

2008/9/3, Daniele Bosi <d.bosi@selcomgroup.com>:
Try to set some flag into the third parameter of the request_irq()
func= tion like:

SA_SHIRQ        = ;        Interrupt is shared
SA_INTERRUPT          =   Disable local interrupts while processing

SA_SAMPLE_RANDOM        The interr= upt can be used for entropy

otherwise try to use the function inst= all_irq_handler()


bye Daniele



S=E9bastien = Chr=E9tien ha scritto:

> Hello,
>
> I am trying to register a function writh IRQ :
>
= > static irqreturn_t uart_test (int irq , void *dev_id)
> {
&= gt;     printk("/!\\ Interruption : tx_empty\n&quo= t;);
>        return IRQ_HAN= DLED;
> }
>
>     req=3Drequest_irq(0x18,ua= rt_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@ozlabs.org
> https://= ozlabs.org/mailman/listinfo/linuxppc-dev

--


----= --------------------------------------------------------------------

  Daniele Bosi

*DIGITEK S.p.A.*

Via L. Rom= agnoli 24,
41033 Concordia sulla Secchia
Modena (MO), Italy
*Tel*: +39-(0)53556942 Fax. +39-(0)53554550

*Web:  &nb= sp; * http://www.digitek.it

*Mail to:* d.bosi@selcomgro= up.com <mailto:d.bosi@selc= omgroup.com>


------=_Part_29996_1129382.1220454226270--