linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Yoder Stuart-B08248" <stuart.yoder@freescale.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] powerpc: document new interrupt-array property
Date: Thu, 22 Feb 2007 18:09:40 +0100	[thread overview]
Message-ID: <259dc2545888e6588a8a0707ad2e84b0@kernel.crashing.org> (raw)
In-Reply-To: <9696D7A991D0824DBA8DFAC74A9C5FA302A592C7@az33exm25.fsl.freescale.net>

> Option #2 -- new interrupt-array property.  MAL would look
> like this:
>
>   MAL0: mcmal {
>       /* FIXME */
>       device_type = "mcmal-dma";
>       compatible = "ibm,mcmal-440gp", "ibm,mcmal";
>       dcr-reg = <180 62>;
>       num-tx-chans = <4>;
>       num-rx-chans = <4>;
>       interrupt-array = <&UIC0 a 4
>                          &UIC0 b 4
>                          &UIC1 0 4
>                          &UIC1 1 4
>                          &UIC1 2 4>;
>   };

I'd rather write it like

>       interrupts        = < a 4   b 4   0 4   1 4   2 4 >
>       interrupt-parents = <&UIC0 &UIC0 &UIC1 &UIC1 &UIC1>

to stay closer to the existing binding, but yes.

> Option #3 -- define new, logical interrupt nexus to do
> the mapping.   Not sure if I got this right but here is
> my take on what this might look like:
>
>   MALINT: malint_nexus {
>       #interrupt-cells = <1>;
>       #address-cells = <0>;
>       #size-cells = <0>;
>       interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
>                /*RXEOB*/ 1 &UIC0 b 4
>                /*SERR*/  2 &UIC1 0 4
>                /*TXDE*/  3 &UIC1 1 4
>                /*RXDE*/  4 &UIC1 2 4>;
>       interrupt-map-mask = <ffffffff>;
>   }
>
>   MAL0: mcmal {
>       /* FIXME */
>       device_type = "mcmal-dma";
>       compatible = "ibm,mcmal-440gp", "ibm,mcmal";
>       dcr-reg = <180 62>;
>       num-tx-chans = <4>;
>       num-rx-chans = <4>;
>       interrupt-parent = <&MALINT>;
>       interrupts = <0 1 2 3 4>;
>   };
>
> The malint_nexus node is attache to / I guess??  Segher
> is this what you had in mind?

I'd put it as a child node of the mcmal node, like this:

   MAL0: mcmal {
       /* FIXME */
       device_type = "mcmal-dma";
       compatible = "ibm,mcmal-440gp", "ibm,mcmal";
       dcr-reg = <180 62>;
       num-tx-chans = <4>;
       num-rx-chans = <4>;
       interrupt-parent = <&MALINT>;
       interrupts = <0 1 2 3 4>;

       MALINT: mal-nexus {
           device_type = "interrupt-nexus"
           #interrupt-cells = <1>;
           interrupt-map = </*TXEOB*/  0   &UIC0   a 4
                            /*RXEOB*/  1   &UIC0   b 4
                            /*SERR*/   2   &UIC1   0 4
                            /*TXDE*/   3   &UIC1   1 4
                            /*RXDE*/   4   &UIC1   2 4>;
           interrupt-map-mask = <ff>;
       }
   }

> The question is-- is option #3 clear enough?

I think so.  A separate nexus pseudo-node needs hardly
any properties (no "#address-cells", no "reg", no nothing)
and nicely expresses the whole thing, within the existing
framework.

> Is a new property warranted?

The proposed "interrupt-array" property, apart from being
a horrible name, only handles one very specific manifestation
of a much more general problem: random weirdness in the
interrupt routing that doesn't conform to the "normal" device
tree.  The existing interrupt mapping binding can handle the
generic case just fine, with a very simple but extremely
flexible framework.  The fact that you sometimes need an
extra "pseudo" device node is actually very natural: it
represent an interrupt "bus".  There is no really good place
for such a node though; depending on the situation, it seems
best to hang it either from the node that represents the
origin of the interrupts (in case this is routing from one
device only), or the node that represents their destination
(typically, an interrupt controller).


Segher

  reply	other threads:[~2007-02-22 17:09 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 [this message]
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
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=259dc2545888e6588a8a0707ad2e84b0@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=stuart.yoder@freescale.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).