From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 10 Jan 2008 18:05:29 +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-3-git-send-email-hskinnemoen@atmel.com> <47864D86.7020800@gmail.com> Message-ID: <200801101805.30186.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 Thursday 10 January 2008, 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 > > Acked-by: Ben Warren > > > 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 Or even better, using an empty baord_eth_initialize() function with the weak attribute. We get rid of this #ifdef this way. > 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. > > Thoughts? How about if the board/platform code could add eth_init functions to a function-list. eth.c could then just call all functions in the list. Comments? 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 =====================================================================