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

Timur Tabi timur.tabi at gmail.com
Sun May 23 20:32:14 CEST 2010


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.

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the U-Boot mailing list