From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 25 Mar 2008 15:43:14 +0100 Subject: [U-Boot-Users] [RFC][PATCH 1/1] Add board_eth_init() function In-Reply-To: <47E90A8A.5000607@gmail.com> References: <200803221114.40956.sr@denx.de> <200803250804.13314.sr@denx.de> <47E90A8A.5000607@gmail.com> Message-ID: <200803251543.14600.sr@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 On Tuesday 25 March 2008, Ben Warren wrote: > I thought about this some more, and the problem is that cpu_eth_init() and > board_eth_init() are mutually exclusive, Right. > with board_eth_init() having a > higher priority. I think the following will work, but would appreciate some > feedback. > > ----- > > int board_eth_init(bd_t *bis) __attribute(weak); > int cpu_eth_init(bd_t *bis) __attribute(weak); > > . > . > . > > if (board_eth_init) > board_eth_init(bis); > else if (cpu_eth_init) > cpu_eth_init(bis); > > ----- > > This gets rid of the pointless aliases and gives precedence to the > board-specific initialization. I like it. Thanks. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================