linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: Nick <ndroogh@rogers.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: MPC5200b external interrupt registration problem
Date: Mon, 12 May 2008 08:03:22 -0600	[thread overview]
Message-ID: <fa686aa40805120703k61e26022lf43aa826a159ccca@mail.gmail.com> (raw)
In-Reply-To: <169407.5661.qm@web88102.mail.re2.yahoo.com>

On Fri, May 9, 2008 at 12:49 PM, Nick <ndroogh@rogers.com> wrote:
> Hi,
>
>  I am writing a driver to service an interrupt from our fpga.  I am calling request_irq in the open
>  function of my driver.  The fpga is connected to external interrupt 1.  I am using interrupt
>  number 65 in the request_irq but the function is failing.  I traced to a function called setup_irq
>  in file /kernel/irq/manage.c.  It fails because at this line: if (desc->chip == &no_irq_chip) .
>  Is 65 the wrong interrupt number?  What do I need to do to properly setup for external interrupts?

What kernel version are you using?
Are you using arch/ppc or arch/powerpc?

There has been a major shift in embedded powerpc support in the last
year.  Now, instead of hard coding the peripheral list in the platform
code, the devices are described in an OpenFirmware style device tree.
(See arch/powerpc/boot/dts/lite5200b.dts).

You need to add a node to the tree for your device and specify the
interrupt there.  Then use either of_irq_map_one() or
irq_of_parse_and_map() to get something that you can pass to
request_irq().

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

      parent reply	other threads:[~2008-05-12 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-09 18:49 MPC5200b external interrupt registration problem Nick
2008-05-09 19:02 ` Scott Wood
2008-05-10  7:30   ` Michael Ellerman
2008-05-12 14:03 ` Grant Likely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa686aa40805120703k61e26022lf43aa826a159ccca@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ndroogh@rogers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).