From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haavard Skinnemoen Date: Thu, 10 Jan 2008 18:28:20 +0100 Subject: [U-Boot-Users] [PATCH 2/2] AVR32: ATNGW100 board support In-Reply-To: <47864D86.7020800@gmail.com> References: <1199953497-777-1-git-send-email-hskinnemoen@atmel.com> <1199953497-777-2-git-send-email-hskinnemoen@atmel.com> <1199953497-777-3-git-send-email-hskinnemoen@atmel.com> <47864D86.7020800@gmail.com> Message-ID: <20080110182820.73e56a4d@siona> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 10 Jan 2008 11:53:26 -0500 Ben Warren wrote: > I'm not crazy about /net/eth.c calling board-specific ethernet > initialization routines - it should be calling the driver > initialization. This file is enough of a mess as it is, and adding a > new entry for each board only makes it worse. Since there's > precedent, though, consider this Yeah...the problem is that there are two ethernet controllers on the AP7000 and only the board knows which one(s) to initialize. I don't want the driver to know about such things. > Acked-by: Ben Warren Thanks. > In the next release (not the one finishing in a week), what do you > think about this: > > #if defined(CONFIG_BOARD_ETH_INIT) > board_eth_initialize(bis) > #endif I like it, but Stefan's suggestion about providing an empty, weak function would be even better. > Moving Ethernet initialization in general to the board (not just > Atmel boards) would go a long way towards cleaning up the current > mess and would provide more scalability and flexibility. Yes, I think moving the "top-level" ethernet initialization function to the board code would be the right thing to do. The board could then register all the controllers, apply PHY quirks, etc. before handing things over to the networking layer. Haavard