All of lore.kernel.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Stuart Yoder <b08248@freescale.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] powerpc: document new interrupt-array property
Date: Thu, 22 Feb 2007 08:19:32 +0100	[thread overview]
Message-ID: <9841c5ba165e4bec773366568b3d4195@kernel.crashing.org> (raw)
In-Reply-To: <200702212325.l1LNPBwL007793@ld0164-tx32.am.freescale.net>

> Added description of an interrupt-array property. This
> is needed to cleanly describe the interrupt properties
> of devices with interrupts routed to multiple
> interrupt controllers.

I don't really like the idea of adding a new redundant
property to handle this non-problem; but assuming you _do_
really want to add new properties, here are some comments.

> +The the device tree represents the busses and


The the.

> +In addition, a logical 'interrupt tree' exists which
> +represents the interrupt routing and topology of the
> +hardware.

The logical topology only, not necessarily the physical.
And it's not necessarily a tree, you might want to mention
that here, not everyone reads the references :-)

> Devices that generate interrupts have
> +a property with a value which is a phandle to the
> +parent node in the interrupt tree.

Most don't actually, there only is an "interrupt-parent"
property if you don't get to your interrupt parent by
simply walking up in the device tree until you hit an
interrupt controller (possibly applying interrupt maps
along the way).  [All non-root interrupt controllers are
also required to have an "interrupt-parent" property,

> +The interrupt tree model is fully described in the the
> +document "Open Firmware Recommended Practice: Interrupt
> +Mapping Version 0.9".  The document is available at:
> +http://playground.sun.com/1275/practice.

Don't tuck the full stop onto the URL, it makes it hard to
select it.  One good way is to put < > around the URL.

> Each device which generates
> +interrupts should have the following properties:
> +
> +	- interrupt-parent : contains the phandle of the interrupt
> +          controller which handles interrupts for this device
> +          (Note: if interrupt-parent is not specified the interrupt
> +           parent is assumed to be the device tree parent)

Many interrupt devices _shouldn't_ have this property.

> +	- interrupts : a list of tuples representing the interrupt
> +          number and the interrupt sense and level for each interrupt
> +          for this device.

That combination is called an "interrupt specifier", and it
can contain more information (or even different information)
than just number and sense/level.

> +   Devices connected to openPIC-compatible controllers should encode

It's spelled OpenPIC.

> +The interrupt-array property consists of an arbitrary number
> +of 2-tuples consisting of a interrupt parent phandle and
> +an interrupt specifier.

It would be nicer to keep the "interrupts" property and
add a property "interrupt-parents" with the same number
of entries, that encodes the same as "interrupt-parent"
but per interrupt.  You keep more in line with the
"normal" stuff and I suspect it's less code to parse as
well.

> +   ethernet@25000 {
> +       #address-cells = <1>;
> +       #size-cells = <0>;
> +       device_type = "network";
> +       model = "TSEC";

"model" should be more specific, please don't show bad
practice in examples :-)

> +In the example, the interrupt-array defines three
> +interrupts-- interrupt 0x13 and 0x14 go to the pic0 interrupt
> +controller and interrupt 18 goes to pic1.

0x18

> +Note: the number of cells needed to represent the
> +interrupt-specifier is determined by the #interrupt-cells
> +property of the interrupt parent.

Wrong place to document this?  It's true for all interrupt
specifiers.


Segher

  parent reply	other threads:[~2007-02-22  7:19 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21 23:25 [PATCH] powerpc: document new interrupt-array property Stuart Yoder
2007-02-22  0:29 ` Kumar Gala
2007-02-22  1:18   ` David Gibson
2007-02-22  7:01     ` Segher Boessenkool
2007-02-22 10:34       ` David Gibson
2007-02-22 11:06         ` Segher Boessenkool
2007-02-22 15:47           ` Yoder Stuart-B08248
2007-02-22 17:09             ` Segher Boessenkool
2007-02-23 19:15               ` Yoder Stuart-B08248
2007-02-23 21:30                 ` Segher Boessenkool
2007-02-23 21:57                   ` Yoder Stuart-B08248
2007-02-23 22:30                     ` Segher Boessenkool
2007-02-24  6:42                     ` Benjamin Herrenschmidt
2007-02-24  6:40                 ` Benjamin Herrenschmidt
2007-02-24 11:24                   ` Segher Boessenkool
2007-02-26  4:16                   ` David Gibson
2007-02-26  5:36                     ` Segher Boessenkool
2007-02-26 13:08                       ` David Gibson
2007-02-26 14:26                         ` Segher Boessenkool
2007-02-27  2:32                           ` David Gibson
2007-02-27  2:52                             ` Segher Boessenkool
2007-02-27  3:45                               ` David Gibson
2007-02-27 11:49                                 ` Segher Boessenkool
2007-02-28  0:40                                   ` David Gibson
2007-02-28  1:00                                     ` Segher Boessenkool
2007-02-28  6:40                                       ` Benjamin Herrenschmidt
2007-02-26 16:53                     ` Yoder Stuart-B08248
2007-02-22 22:57             ` David Gibson
2007-02-23  0:07               ` Segher Boessenkool
2007-02-23  0:33                 ` David Gibson
2007-02-23  0:50                   ` Segher Boessenkool
2007-02-23 16:07                     ` Yoder Stuart-B08248
2007-02-23 16:14                       ` Kumar Gala
2007-02-23 17:00                         ` Segher Boessenkool
2007-02-23 16:55                       ` Segher Boessenkool
2007-02-23 17:01                         ` Yoder Stuart-B08248
2007-02-23 17:51                           ` Segher Boessenkool
2007-02-22 22:48           ` David Gibson
2007-02-23  0:25             ` Segher Boessenkool
2007-02-24  6:30       ` Benjamin Herrenschmidt
2007-02-24 11:16         ` Segher Boessenkool
2007-02-22  7:19 ` Segher Boessenkool [this message]
2007-02-24  6:35   ` Benjamin Herrenschmidt
2007-02-24 11:11     ` Segher Boessenkool

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=9841c5ba165e4bec773366568b3d4195@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=b08248@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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 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.