[U-Boot-Users] [PATCH 7/8] SPARC: Added GRETH Ethernet 10/100/1000 support for LEON3

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Thu Mar 13 13:27:07 CET 2008


On 10:39 Thu 13 Mar     , Daniel Hellstrom wrote:
> GRETH is an Ethernet 10/100 or 10/100/1000 MAC with out without
> a debug link (EDCL). The GRETH core is documented in GRIP.pdf
> available at www.gaisler.com.
> 
> If the GRETH has GigaBit support (GBIT, Scatter gather, checksum
> offloading etc.) can be determined by a bit in the control register.
> The GBIT MAC is supported by operating in GRTEH 10/100 legacy mode.
> 
> Best Regards,
> Daniel Hellstrom
> 
> 
>  drivers/net/Makefile |    1 +
>  drivers/net/greth.c  |  644 
> ++++++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/net/greth.h  |   97 ++++++++
>  net/eth.c            |    4 +
>  4 files changed, 746 insertions(+), 0 deletions(-)
> 
> 
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index b9723fa..be3a232 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -57,6 +57,7 @@ COBJS-y += tigon3.o
>  COBJS-y += tsec.o
>  COBJS-y += tsi108_eth.o
>  COBJS-y += uli526x.o
> +COBJS-y += greth.o
>  
>  COBJS    := $(COBJS-y)
>  SRCS     := $(COBJS:.o=.c)
> diff --git a/drivers/net/greth.c b/drivers/net/greth.c
> new file mode 100644
> index 0000000..3084771
> --- /dev/null
> +++ b/drivers/net/greth.c
> @@ -0,0 +1,644 @@
> +/* Gaisler.com GRETH 10/100/1000 Ethernet MAC driver
> + *
> + * Driver use polling mode (no Interrupt)
> + *
> + * (C) Copyright 2007
> + * Daniel Hellstrom, Gaisler Research, daniel at gaisler.com
> + *
> + * 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 <command.h>
> +#include <net.h>
> +
> +#ifdef CONFIG_GRETH
Please move this to the Makefile
> +
> +#include <malloc.h>
> +#include <asm/processor.h>
> +#include <ambapp.h>
> +#include <asm/leon.h>
> +
> +/* #define DEBUG */
> +
> +#include "greth.h"

Please remove the whitespace too.

Best Regards,
J.




More information about the U-Boot mailing list