[U-Boot] [PATCH] ppc/85xx: Add a structure defn for PIXIS registers

Kumar Gala galak at kernel.crashing.org
Mon May 24 00:53:32 CEST 2010


On May 23, 2010, at 1:32 PM, Timur Tabi wrote:

> On Sat, May 22, 2010 at 5:33 PM, Kumar Gala <galak at kernel.crashing.org> wrote:
>> +#if defined(CONFIG_MPC8536DS)
>> +typedef struct pixis {
>> +       u8 id;
>> +       u8 ver;
>> +       u8 pver;
>> +       u8 csr;
>> +       u8 rst;
>> +       u8 rst2;
>> +       u8 aux1;
>> +       u8 spd;
>> +       u8 aux2;
>> +       u8 csr2;
>> +       u8 watch;
> 
> May I suggest this instead:
> 
> typedef struct pixis {
>       u8 id;
>       u8 ver;
>       u8 pver;
>       u8 csr;
>       u8 rst;
> #ifdef CONFIG_MPC8536DS
> ...
> #elsif CONFIG_MPC8544DS
> ...
> 
> and so on.
> 
> Besides being more compact, my editor has built-in cscope
> functionality, and it gets confused if there's more than one "typedef
> struct pixis" in the file.
> 
> You don't have to worry about any more boards using these structures.
> Gary M. said that all future boards will use ngpixis.

I'm leaving them as is.  Its too much noise in the file to deal with the differences and is not worth it to me.

- k


More information about the U-Boot mailing list