From: "S. Fricke" <silvio.fricke@googlemail.com>
To: linuxppc-dev@ozlabs.org
Subject: Re: [NEWBIE] Interrupt-problem mpc5200
Date: Wed, 19 Sep 2007 09:16:43 +0200 [thread overview]
Message-ID: <20070919071643.GE5682@sfrouter> (raw)
In-Reply-To: <fa686aa40709121229h6bb2902etffcd197e2e5af722@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]
Hello,
> > Can u give me an example with a single IRQ of a configuration-node for a
> > dts?
>
> myreallycooldevice@0 {
> interrupts = <1 2 3>;
> interrupt-parent = <&mpc5200_pic>;
> };
Ahh - oh weh - so simple! Thank you!
> The interrupts property matches the size of the #interrupt-cells
> property in the interrupt controller node. For the 5200-intc, each
> interrupt is described by 3 cells; l1, l2 and sense which is a
> reflection of the interrupt controller architecture. For IRQ0, l1=0,
> l2=0; IRQ1, l1=1, l2=1; IRQ2, l1=1 and l2=2; IRQ3, l1=1, l2=3 Sense is
> described in mpc52xx-device-tree-bindings.txt
OK, my dts is now:
/ {
/* ... */
soc5200@f0000000 {
/* ... */
intpin@0 {
interrupt-parent = <500>;
interrupts = <1 2 2>;
};
/* ... */
};
/* ... */
};
And the corresponding code is:
struct intmod_priv {
/** Interrupt-Number */
int own_irq;
/** The of-device-node */
struct device_node *intmod_dev_node;
};
static int __init mod_init( void )
{
// ...
priv.intmod_dev_node = NULL;
priv.intmod_dev_node = of_find_node_by_name(NULL, "intpin");
priv.own_irq = irq_of_parse_and_map(priv.intmod_dev_node, 0);
request_irq(priv.own_irq, intmod_isr, IRQF_DISABLED , "intmod", INTMOD_IRQ_BOARD);
// ...
Thank you and bye, my next question is following :-)
Silvio Fricke
--
-- S. Fricke ----------------------------- MAILTO:silvio.fricke@gmail.com --
Diplom-Informatiker (FH)
Linux-Entwicklung
----------------------------------------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-09-19 7:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-06 13:30 [NEWBIE] Interrupt-problem mpc5200 S. Fricke
2007-09-11 12:41 ` S. Fricke
2007-09-11 14:19 ` Grant Likely
2007-09-11 18:28 ` S. Fricke
2007-09-11 19:05 ` Grant Likely
2007-09-12 18:30 ` S. Fricke
2007-09-12 19:29 ` Grant Likely
2007-09-19 7:16 ` S. Fricke [this message]
2007-09-19 14:31 ` Grant Likely
2007-09-14 13:29 ` Matt Sealey
2007-09-14 14:53 ` Grant Likely
2007-09-14 15:18 ` Matt Sealey
2007-09-14 15:49 ` Grant Likely
2007-09-14 16:04 ` Matt Sealey
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=20070919071643.GE5682@sfrouter \
--to=silvio.fricke@googlemail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=silvio.fricke@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.