[U-Boot] [PATCH 9/9] Add initial support for Freescale mx51evk board

Wolfgang Denk wd at denx.de
Mon Jan 18 09:50:58 CET 2010


Dear Stefano Babic,

In message <4B540EF1.9050109 at denx.de> you wrote:
>
> >> +static void setup_fec(void)
> >> +{
> > 
> > FEC should only be set up (and eventually only be reset, too), if
> > there is any network support at all on this board.
> 
> The name is misleading, too. The FEC is not initialized here and the
> function is responsible only to set the IOMUX pin multiplexer for the
> network controller. Nothing more. The name shoud be something such as
> "set_iomux_network".

Ah, I see.

> I can of course surround the function with #ifdef CONFIG_FEC_MXC, but
> really do I need ? We cannot change how the processor's pins are
> connected on the board, even if we do not want to add network support
> for this board. I think it should be ok if the pin multiplexer is always
> configured, independently if there is a network device or not.

This is indeed ok.My concern was not to enable peripherals and clocks
unless needed. The thing is, such an initial port will be used as
reference by all others that will add new boards of the same
architecture, and it's easier not to enable interfaces initially
(people will notice that - say - Ethenret is not working) then to try
to reduce the power consumpion of the device later, not knowing which
unused clocks or peripherals might be turned on and sucking off the
battery.

> >> +#define CONFIG_ENV_SECT_SIZE    (128 * 1024)
> >> +#define CONFIG_ENV_SIZE         CONFIG_ENV_SECT_SIZE
> >> +#define CONFIG_ENV_IS_NOWHERE
> > 
> > Seems strange to me to define an environment sector size and an
> > environment size and then to say there is no environment at all?
> 
> Right. The mx51evk board has neither NOR nor NAND flash. However, a SPI
> flash is available and this defines are required when the spi will be
> supported. At the moment, I can drop them and reinsert later.

So at the moment we cannot save the envrionment? Arghhh...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is impractical for  the  standard  to  attempt  to  constrain  the
behavior  of code that does not obey the constraints of the standard.
                                                          - Doug Gwyn


More information about the U-Boot mailing list