[U-Boot] [PATCH] Olimex SAM9-L9260 board support

Cristian Birsan cristian.birsan at gmail.com
Mon Oct 6 22:33:25 CEST 2008


Dear Wolfgang Denk,

Thank you for your quick response.

 >> +#ifdef CONFIG_RESET_PHY_R
 >> +void reset_phy(void)
 >> +{
 >> +#ifdef CONFIG_MACB
 >> +    /*
 >> +     * Initialize ethernet HW addr prior to starting Linux,
 >> +     * needed for nfsroot
 >> +     */
 >> +    eth_init(gd->bd);
 >> +#endif
 >
 > Please do NOT  do  this.  It's  a  violation  of  the  U-Boot  design
 > principles,  which  clearly  say that only such periphereals that are
 > actually being used by U-Boot shall be initialized, and even if  they
 > are being used, these shall be deactivated after use.
 >
 > Carelessly leaving ports or devices in an initialized stated has been
 > the source for problems too many times before.
 >
 > Don't do that.
 >

The above code section is used also in other ATMEL boards like
at91sam9260ek ( /board/atmel/at91sam9260ek/at91sam9260ek.c ),
at91sam9261ek, at91sam9263ek, at91sam9rlek. This is my
first patch sent to U-Boot and I used that code as reference.

The board that i have (SAM9-L9260 from Olimex ) is close to
AT91SAM9260EK from ATMEL.

How do you think i can do this the right way?

 >> +#define ROUND(A, B)        (((A) + (B)) & ~((B) - 1))
 >
 > First I think that this is wrong (maybe you need "B-1" instead of "B"
 > in the first part?), second we already have DIV_ROUND_UP  defined  in
 > common.h so please use this.

Thanks, good catch. I will fix this and submit a new patch.

Best regards,
Cristian Birsan


More information about the U-Boot mailing list