On Tue, 10 Jun 2008 01:29:27 -0700
Ben Warren <[EMAIL PROTECTED]> wrote:

> This patch is the first step in cleaning up net/eth.c, by moving Ethernet
> initialization to CPU or board-specific code.  Initial implementation is
> only on the Freescale TSEC controller, but others will be added soon.
> 
> Signed-off-by: Ben Warren <[EMAIL PROTECTED]>

Sweet!

> ---
> 
> When we discussed this a few months ago, I was planning on defining the 
> cpu_eth_init() and board_eth_init() functions as weak with no aliases, but in
> my testing this did not result in them being NULL, hence the default function.

Works just as well, doesn't it?

> diff --git a/net/eth.c b/net/eth.c
> index c4f24c6..e75dc43 100644
> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -28,6 +28,12 @@
>  
>  #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
>  
> +/* CPU and board-specific Ethernet initializations.  Aliased function
> + * signals caller to move on */
> +static int __def_eth_init(bd_t *bis) {return -1;}

Just a cosmetic thing: I really think this should look like a normal
function, i.e. not cuddling everything up on one line. I've seen such
things being mistaken for macros before.

Haavard

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to