public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH][Re-Submit] Custom AFEB9260 board support
Date: Fri, 29 Aug 2008 10:48:56 -0700	[thread overview]
Message-ID: <48B83688.7030300@gmail.com> (raw)
In-Reply-To: <12199996591365-git-send-email-slapin@ossfans.org>

Hi Sergey,

Sergey Lapin wrote:
> This patch provides support for AFEB9260 board, a product of
> OpenSource hardware and software. Some commertial projects
> are made with this design. A board is basically AT91SAM9260-EK
> with some modifications and different peripherals and different
> parts used. Main purpose of this project is to gain experience in
> hardware design.
> More info: http://groups.google.com/group/arm9fpga-evolution-board
> (In Russian only, sorry).
> Subversion repository: svn://194.85.238.22/home/users/george/svn/arm9eb
>
> Signed-off-by: Sergey Lapin <slapin@ossfans.org>
> ---
>   
<snip>
> diff --git a/board/afeb9260/ether.c b/board/afeb9260/ether.c
> new file mode 100644
> index 0000000..a1f71db
> --- /dev/null
> +++ b/board/afeb9260/ether.c
> @@ -0,0 +1,37 @@
> +/*
> + *
> + * (C) Copyright 2008 Sergey Lapin <slapin@ossfans.org>
> + * AFEB9260 Ethernet support.
> + * Based on Atmel AT91SAM9260-EK ethernet support
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +#include <common.h>
> +
> +#include <asm/arch/memory-map.h>
> +
> +extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
> +
> +#if defined(CONFIG_MACB) && defined(CONFIG_CMD_NET)
> +void afeb9260_eth_initialize(bd_t *bi)
> +{
> +	macb_eth_initialize(0, (void *)AT91_BASE_EMAC, 0x01);
> +}
> +#endif
> +
>   
This file is no longer needed.  Please follow the 'board_eth_init()' 
method.  A good example is in:
board/atmel/atngw100/atngw100.c

Tonight I'll submit a patch that does this for all the at91 boards too.

<snip>
> diff --git a/net/eth.c b/net/eth.c
> index 4e508a0..26cc9f2 100644
> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -67,6 +67,7 @@ extern int tsi108_eth_initialize(bd_t*);
>  extern int npe_initialize(bd_t *);
>  extern int uec_initialize(int);
>  extern int at91sam9_eth_initialize(bd_t *);
> +extern int afeb9260_eth_initialize(bd_t *);
>  
>  #ifdef CONFIG_API
>  extern void (*push_packet)(volatile void *, int);
> @@ -254,10 +255,31 @@ int eth_initialize(bd_t *bis)
>  #if defined(CONFIG_RTL8169)
>  	rtl8169_initialize(bis);
>  #endif
> -#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
> -    defined(CONFIG_AT91SAM9263)
> +#if defined(CONFIG_BF537)
> +	bfin_EMAC_initialize(bis);
> +#endif
> +#if defined(CONFIG_ATSTK1000)
> +	atstk1000_eth_initialize(bis);
> +#endif
> +#if defined(CONFIG_GRETH)
> +	greth_initialize(bis);
> +#endif
> +#if defined(CONFIG_ATNGW100)
> +	atngw100_eth_initialize(bis);
> +#endif
> +#if defined(CONFIG_MCFFEC)
> +	mcffec_initialize(bis);
> +#endif
> +#if defined(CONFIG_FSLDMAFEC)
> +	mcdmafec_initialize(bis);
> +#endif
> +#if !defined(CONFIG_AFEB9260) && (defined(CONFIG_AT91CAP9) || \
> +	defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9263))
>  	at91sam9_eth_initialize(bis);
>  #endif
> +#if defined(CONFIG_AFEB9260)
> +	afeb9260_eth_initialize(bis);
> +#endif
>  
>  	if (!eth_devices) {
>  		puts ("No ethernet found.\n");
>   
Once you implement board_eth_init() as mentioned above, you no longer 
need to touch net/eth.c

regards,
Ben

  reply	other threads:[~2008-08-29 17:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08  7:55 [U-Boot] [PATCH][AT91] Custom AFEB9260 board support Sergey Lapin
2008-08-11 10:23 ` Sergey Lapin
2008-08-11 11:02   ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-11 11:43     ` Sergey Lapin
2008-08-29  0:25 ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-29  8:33   ` [U-Boot] [PATCH] " Sergey Lapin
2008-08-29  8:47     ` [U-Boot] [PATCH][Re-Submit] " Sergey Lapin
2008-08-29 17:48       ` Ben Warren [this message]
2008-08-29 20:03         ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-29 20:23           ` Ben Warren
2008-10-26 10:43             ` [U-Boot] [PATCH][Re-Submit-again] " Sergey Lapin
2008-10-26 13:49               ` Jean-Christophe PLAGNIOL-VILLARD
2008-10-26 19:05                 ` Jean-Christophe PLAGNIOL-VILLARD
2008-10-26 19:26                   ` [U-Boot] [PATCH][Re-Submit-again2] " Sergey Lapin
2008-10-29  9:04                     ` Sergey Lapin
2008-10-30 15:42                       ` Sergey Lapin
  -- strict thread matches above, loose matches on Subject: below --
2008-09-27 17:55 [U-Boot] [PATCH][Re-Submit] " Sergey Lapin
2008-09-29 16:45 ` Ben Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B83688.7030300@gmail.com \
    --to=biggerbadderben@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox