[PATCH] powerpc: document new interrupt-array property

Yoder Stuart-B08248 stuart.yoder at freescale.com
Sat Feb 24 08:57:11 EST 2007


 

> -----Original Message-----
> From: Segher Boessenkool [mailto:segher at kernel.crashing.org] 
> Sent: Friday, February 23, 2007 3:31 PM
> To: Yoder Stuart-B08248
> Cc: David Gibson; linuxppc-dev at ozlabs.org; paulus at samba.org
> Subject: Re: [PATCH] powerpc: document new interrupt-array property
> 
> >> I'd rather write it like
> >>
> >>>       interrupts        = < a 4   b 4   0 4   1 4   2 4 >
> >>>       interrupt-parents = <&UIC0 &UIC0 &UIC1 &UIC1 &UIC1>
> >>
> >
> > Segher, with your proposal here of an interrupt-parents property
> > is this really keeping with the normal OF way of representing
> > property values?
> >
> > Examples exists where one property tells you how to interpret
> > or decode another (e.g. #address-cells), but your proposal we
> > have two distinct properties each with values that together
> > provide the complete 'value' (interrupt parent + interrupt
> > specifier).  Is there any precedent for this approach?
> 
> "interrupt-parent" normally is a separate property already.
> "My" way, you keep the original definition for "interrupts"
> and the bleeding obvious definition for "interrupt-parents".
> 
> An example where two arrays with corresponding entries is
> already used is "alternate-reg" in the PCI binding.  There
> are literally hundreds of examples of non-array properties
> that only make sense together, of course.
> 
> Both "alternate-reg" and "interrupt-parents" can be seen as
> an optional extension to their corresponding array properties
> ("reg" and "interrupts" respectively) so it all makes perfect
> sense (to me, at least ;-) ).

Here is the difference though-- in the interrupt-parent/interrupts
case you need interrupt-parents to _even parse_ interrupts.

The #interrupt-size could be different for each of the interrupts
parents.

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

You don't know how many cells per interrupt until you traverse up to
the interrupt parent.

I understand some properties only make sense together, but only
can be parsed together seems ugly.

Stuart





More information about the Linuxppc-dev mailing list