From: Wolfgang Denk Date: Wed, 11 Feb 2009 13:19:30 +0100 Subject: [U-Boot] [PATCH] ppc4xx: Fix problem with board_eth_init() vs cpu_eth_init() on AMCC boards In-Reply-To: <1234342325-28950-1-git-send-email-sr@denx.de> References: <1234342325-28950-1-git-send-email-sr@denx.de> Message-ID: <20090211121930.7F9B4832E893@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Stefan Roese, In message <1234342325-28950-1-git-send-email-sr@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 > --- > 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