[U-Boot] [PATCH V2 4/6] mv_egiga: only randomize MAC on kirkwood

Prafulla Wadaskar prafulla at marvell.com
Fri Jul 9 10:58:58 CEST 2010


 

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de 
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert Aribaud
> Sent: Friday, July 09, 2010 12:04 PM
> To: u-boot at lists.denx.de
> Subject: [U-Boot] [PATCH V2 4/6] mv_egiga: only randomize MAC 
> on kirkwood

Otherway: Some SOCs cannot generate random numbers required for Randomize MAC address generation.
Mostly on any SoC there are time varient registors than can be used to generate random number for system need.

If it is not possible on some SoC (ex. Orion5x) or not yet discovered, then skip this logic under CONFIG_SKIP_RANDOMNUMGEN (ex.)
 
> 
> 
> Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
> ---
>  drivers/net/mv_egiga.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/mv_egiga.c b/drivers/net/mv_egiga.c
> index 96e6a5a..9db24ba 100644
> --- a/drivers/net/mv_egiga.c
> +++ b/drivers/net/mv_egiga.c
> @@ -698,13 +698,21 @@ int mv_egiga_initialize(bd_t * bis)
>  		}
>  
>  		while (!eth_getenv_enetaddr(s, dev->enetaddr)) {
> -			/* Generate Random Private MAC addr if 
> not set */
> +			/* Generate Private MAC addr if not set */
>  			dev->enetaddr[0] = 0x02;
>  			dev->enetaddr[1] = 0x50;
>  			dev->enetaddr[2] = 0x43;
> +#if defined (CONFIG_KIRKWOOD)

This should ifndef CONFIG_SKIP_RANDOMNUMGEN

Regards..
Prafulla . .


More information about the U-Boot mailing list