"Mark A. Greer" <[email protected]> writes:

[...]

> --- a/arch/arm/mach-davinci/dm355.c
> +++ b/arch/arm/mach-davinci/dm355.c
> @@ -435,6 +435,7 @@ void __init dm355_init_spi0(unsigned chipselect_mask,
>   *   soc     description     mux  mode   mode  mux    dbg
>   *                           reg  offset mask  mode
>   */
> +#ifdef CONFIG_DAVINCI_MUX
>  static const struct mux_config dm355_pins[] = {

Can you move the #ifdef here so dm355_pins is empty in the
!CONFIG_DAVINCI_MUX case, then...

>  MUX_CFG(DM355,       MMCSD0,         4,   2,     1,    0,     false)
>  
> @@ -467,6 +468,7 @@ EVT_CFG(DM355,  EVT8_ASP1_TX,           0,    1,    0,    
>  false)
>  EVT_CFG(DM355,  EVT9_ASP1_RX,              1,    1,    0,     false)
>  EVT_CFG(DM355,  EVT26_MMC0_RX,             2,    1,    0,     false)
>  };
> +#endif
>  
>  /*----------------------------------------------------------------------*/
>  
> @@ -558,6 +560,11 @@ static struct davinci_soc_info davinci_soc_info_dm355 = {
>       .cpu_clks               = dm355_clks,
>       .psc_bases              = dm355_psc_bases,
>       .psc_bases_num          = ARRAY_SIZE(dm355_psc_bases),
> +#ifdef CONFIG_DAVINCI_MUX
> +     .pinmux_base            = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE),
> +     .pinmux_pins            = dm355_pins,
> +     .pinmux_pins_num        = ARRAY_SIZE(dm355_pins),
> +#endif
>  };

drop the #ifdef here, and...

[...]

> diff --git a/arch/arm/mach-davinci/include/mach/common.h 
> b/arch/arm/mach-davinci/include/mach/common.h
> index 7cb3e39..7d072e2 100644
> --- a/arch/arm/mach-davinci/include/mach/common.h
> +++ b/arch/arm/mach-davinci/include/mach/common.h
> @@ -36,6 +36,11 @@ struct davinci_soc_info {
>       struct davinci_clk              *cpu_clks;
>       void __iomem                    **psc_bases;
>       unsigned long                   psc_bases_num;
> +#ifdef CONFIG_DAVINCI_MUX
> +     void __iomem                    *pinmux_base;
> +     const struct mux_config         *pinmux_pins;
> +     unsigned long                   pinmux_pins_num;
> +#endif
>  };

drop the #ifdef from the struct as well.

Basically, I have and aversion the #ifdefs in struct davinci_soc_info
since it leads to extra #ifdefs in the code.

The one around <soc>_pins[] makes more sense since it's a large array
and would waste space.

Kevin

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to