From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Thu, 10 Jan 2008 11:53:26 -0500 Subject: [U-Boot-Users] [PATCH 2/2] AVR32: ATNGW100 board support In-Reply-To: <1199953497-777-3-git-send-email-hskinnemoen@atmel.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> Message-ID: <47864D86.7020800@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Haavard Skinnemoen wrote: > Add support for the ATNGW100 Network Gateway reference design, > including flash, ethernet and MMC support. > > Signed-off-by: Haavard Skinnemoen > --- > MAINTAINERS | 11 ++- > MAKEALL | 1 + > Makefile | 3 + > board/atmel/atngw100/Makefile | 40 +++++++++ > board/atmel/atngw100/atngw100.c | 73 ++++++++++++++++ > board/atmel/atngw100/config.mk | 3 + > board/atmel/atngw100/eth.c | 36 ++++++++ > board/atmel/atngw100/u-boot.lds | 80 +++++++++++++++++ > include/configs/atngw100.h | 182 +++++++++++++++++++++++++++++++++++++++ > net/eth.c | 4 + > 10 files changed, 428 insertions(+), 5 deletions(-) > create mode 100644 board/atmel/atngw100/Makefile > create mode 100644 board/atmel/atngw100/atngw100.c > create mode 100644 board/atmel/atngw100/config.mk > create mode 100644 board/atmel/atngw100/eth.c > create mode 100644 board/atmel/atngw100/u-boot.lds > create mode 100644 include/configs/atngw100.h > > > diff --git a/net/eth.c b/net/eth.c > index 5d9e9c1..f707971 100644 > --- a/net/eth.c > +++ b/net/eth.c > @@ -60,6 +60,7 @@ extern int npe_initialize(bd_t *); > extern int uec_initialize(int); > extern int bfin_EMAC_initialize(bd_t *); > extern int atstk1000_eth_initialize(bd_t *); > +extern int atngw100_eth_initialize(bd_t *); > extern int mcffec_initialize(bd_t*); > > #ifdef CONFIG_API > @@ -269,6 +270,9 @@ int eth_initialize(bd_t *bis) > #if defined(CONFIG_ATSTK1000) > atstk1000_eth_initialize(bis); > #endif > +#if defined(CONFIG_ATNGW100) > + atngw100_eth_initialize(bis); > +#endif > #if defined(CONFIG_MCFFEC) > mcffec_initialize(bis); > #endif > > 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 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? regards, Ben