From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shinya Kuribayashi Date: Wed, 11 Jun 2008 00:16:41 +0900 Subject: [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization In-Reply-To: References: <1213086567-29194-1-git-send-email-biggerbadderben@gmail.com> <200806101112.00887.sr@denx.de> Message-ID: <484E9AD9.2060802@ruby.dti.ne.jp> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Ben Warren wrote: >>> @@ -165,6 +171,10 @@ int eth_initialize(bd_t *bis) >>> #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) >>> miiphy_init(); >>> #endif >>> + /* Try CPU-specific initialization first. If it fails or isn't >>> + * present, call the board-specific initialization */ >>> + if (cpu_eth_init(bis) < 0 ) >> Nitpicking: No space before ")" please. > Huh, don't know how I missed that one. >>> + board_eth_init(bis); >> Shouldn't this be the other way around? >> >> + if (board_eth_init(bis) < 0) >> + eth_eth_init(bis); >> >> So that the board init routine can "overwrite" the cpu init version. >> > Yeah, I think you're right. If board_eth_init() exists, it gets > highest priority. Just wondered, does that mean we could only have either cpu_eth_init or board_eth_init at a time?