[U-Boot] [PATCH] ppc4xx: Fix problem with board_eth_init() vs cpu_eth_init() on AMCC boards

Wolfgang Denk wd at denx.de
Wed Feb 11 13:19:30 CET 2009


Dear Stefan Roese,

In message <1234342325-28950-1-git-send-email-sr at denx.de> you wrote:
> Some AMCC eval boards do have a board_eth_init() function calling
> pci_eth_init(). These boards need to call cpu_eth_init() explicitly now
> with the new eth_init rework.
> 
> Signed-off-by: Stefan Roese <sr at denx.de>
> ---
>  board/amcc/katmai/katmai.c   |    8 +++++++-
>  board/amcc/taihu/taihu.c     |    8 +++++++-
>  board/amcc/taishan/taishan.c |    8 +++++++-
>  board/amcc/yucca/yucca.c     |    8 +++++++-
>  4 files changed, 28 insertions(+), 4 deletions(-)
> 
> diff --git a/board/amcc/katmai/katmai.c b/board/amcc/katmai/katmai.c
> index b6c0c11..cace93f 100644
> --- a/board/amcc/katmai/katmai.c
> +++ b/board/amcc/katmai/katmai.c
> @@ -451,5 +451,11 @@ int post_hotkeys_pressed(void)
>  
>  int board_eth_init(bd_t *bis)
>  {
> -	return pci_eth_init(bis);
> +	cpu_eth_init(bis);
> +	pci_eth_init(bis);
> +
> +	/*
> +	 * Return 0 so that cpu_eth_init() won't get executed again
> +	 */
> +	return 0;

What happens in case of errors? This looks broken to me, or I
misinderstand the comment.

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
Generally speaking, there are other ways to accomplish whatever it is
that you think you need ...                               - Doug Gwyn


More information about the U-Boot mailing list