[U-Boot] [PATCH] Gbe Controller driver support for kirkwood SOCs
    Ben Warren 
    biggerbadderben at gmail.com
       
    Fri Apr  3 21:14:18 CEST 2009
    
    
  
Prafulla Wadaskar wrote:
> From: prafulla_wadaskar <prafulla at marvell.com>
>
> Contributors:
> Yotam Admon <yotam at marvell.com>
> Michael Blostein <michaelbl at marvell.com
>
> Signed-off-by: prafulla_wadaskar <prafulla at marvell.com>
> Reviewed by: Ronen Shitrit <rshitrit at marvell.com>
> ---
>   
<snip>
> diff --git a/net/eth.c b/net/eth.c
> index 4bbf84b..77fa8a5 100644
> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -73,6 +73,7 @@ int board_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
>  
>  extern int mv6436x_eth_initialize(bd_t *);
>  extern int mv6446x_eth_initialize(bd_t *);
> +extern int kirkwood_egiga_initialize(bd_t*);
>  
>  #ifdef CONFIG_API
>  extern void (*push_packet)(volatile void *, int);
> @@ -205,6 +206,9 @@ int eth_initialize(bd_t *bis)
>  #if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
>  	mv6446x_eth_initialize(bis);
>  #endif
> +#ifdef CONFIG_KIRKWOOD_EGIGA
> +       kirkwood_egiga_initialize(bis);
> +#endif
>  	if (!eth_devices) {
>  		puts ("No ethernet found.\n");
>  		show_boot_progress (-64);
>   
I believe Mike mentioned this already, but you shouldn't be initializing 
your drivers here.  You'll notice that this area of code is much smaller 
than it used to be, and the only drivers left are Marvell ones.  I 
started cleaning them up, but the work was huge and lacking hardware I 
was nervous about breaking things.  IIRC, the MV6436X and MV6446X 
drivers duplicate code > 99%.
regards,
Ben
    
    
More information about the U-Boot
mailing list