From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shinya Kuribayashi Date: Wed, 11 Jun 2008 00:49:51 +0900 Subject: [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization In-Reply-To: <200806101725.37247.sr@denx.de> References: <1213086567-29194-1-git-send-email-biggerbadderben@gmail.com> <484E9AD9.2060802@ruby.dti.ne.jp> <200806101725.37247.sr@denx.de> Message-ID: <484EA29F.2080905@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 Stefan Roese wrote: > On Tuesday 10 June 2008, Shinya Kuribayashi wrote: >>>> 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? > > Not really. board_eth_init() could call cpu_eth_init() if necessary. Hm. What is cpu_eth_init for then? Just board_eth_init(bis); seems to be enough for me. I also wonder where is the best place to have cpu_eth_init? I'm not going to argue with you, I'm just thinking about my targets. One of my targets has internal ethernet MAC, and its evaluation board has an on-board external PCI NIC. Another target has internal MAC, but doesn't have PCI NIC. I thought it'll be something like cpu_eth_init(bis); board_eth_init(bis); But again, I don't have strong opinions around here. Please go ahead. Thanks for your comments, Shinya