From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Alan Bennett" <embedded@akb.net>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Describing devices in the device tree
Date: Tue, 16 Oct 2007 14:06:04 -0600 [thread overview]
Message-ID: <fa686aa40710161306s780ebe64g680d6106ecb77d0e@mail.gmail.com> (raw)
In-Reply-To: <bfa0697f0710161136y7d28ccd6w828f16d30f85ce19@mail.gmail.com>
On 10/16/07, Alan Bennett <embedded@akb.net> wrote:
> I'm using a modified ep8248e.dts to describe my hardware and I want to
> enable the use of 3 standard interrupts.
>
> 1. irq5
> 2. timer1
> 3. timer2
>
> How bad does this look?
> soc --> cpm -->
> timer {
> device_type = "timer";
> compatible = "fsl,mpc8248-timer";
> interrupts = <c 8 d 8>;
> interrupt-parent = <&PIC>;
> };
> irq5 {
> device_type = "irq5";
> compatible = "fsl,mpc8248-irq5";
> interrupts = <17 8>;
> interrupt-parent = <&PIC>;
> };
Don't do this. Instead, describe the device that generates the
interrupt. You don't need the device_type property either unless it
is a common device. The compatible property should also describe your
device; not the irq line.
Just creating a device node to describe an irq line doesn't buy you
anything because your device driver still needs to have the knowledge
built into it to use IRQ5. You may as well have just hard coded the
value into your driver instead of traversing through the device tree
to get it.
You get an advantage when you create a node for you *device* that your
device driver can bind, and embed into that node the IRQ line that it
uses.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
prev parent reply other threads:[~2007-10-16 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 18:36 Describing devices in the device tree Alan Bennett
2007-10-16 20:06 ` 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=fa686aa40710161306s780ebe64g680d6106ecb77d0e@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=embedded@akb.net \
--cc=linuxppc-dev@ozlabs.org \
/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).