[U-Boot-Users] [PATCH] Add support for new AVR32 board

Ben Warren biggerbadderben at gmail.com
Mon Mar 10 15:17:26 CET 2008


Hi Alex,

Alex wrote:
>> It is again. I suggest that you first send this message to yourself, until you 
>> figured out how to do it correctly. And if you are working with git, I 
>> strongly encourage you to use git-send-email to send patches.
>>     
>
> Now tested as you suggested:
>
>
> diff -Nur old/u-boot-1.3.0/board/miromico/hammerhead/config.mk 
> new/u-boot-1.3.0/board/miromico/hammerhead/config.mk
> --- old/u-boot-1.3.0/board/miromico/hammerhead/config.mk	1970-01-01 
> 01:00:00.000000000 +0100
> +++ new/u-boot-1.3.0/board/miromico/hammerhead/config.mk	2008-03-10 
> 11:18:50.000000000 +0100
> @@ -0,0 +1,3 @@
> +TEXT_BASE		= 0x00000000
> +PLATFORM_RELFLAGS	+= -ffunction-sections -fdata-sections
> +PLATFORM_LDFLAGS	+= --gc-sections
> diff -Nur old/u-boot-1.3.0/board/miromico/hammerhead/eth.c 
> new/u-boot-1.3.0/board/miromico/hammerhead/eth.c
> --- old/u-boot-1.3.0/board/miromico/hammerhead/eth.c	1970-01-01 
> 01:00:00.000000000 +0100
> +++ new/u-boot-1.3.0/board/miromico/hammerhead/eth.c	2008-03-10 
> 11:18:50.000000000 +0100
> @@ -0,0 +1,35 @@
> +/*
> + * Copyright (C) 2008 Miromico AG
> + *
> + * Ethernet initialization for the AVR32 on Hammerhead
> + *
> + * 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);
> +
> +#ifdef CONFIG_CMD_NET
> +void hammerhead_eth_initialize(bd_t *bi)
> +{
> +	macb_eth_initialize(0, (void *)MACB0_BASE, bi->bi_phy_id[0]);
> +}
> +#endif
>   

Would you mind changing this name to board_eth_initialize(bd_t *bi)?  
I'm working on a rework of the net library and making this name change 
now will avoid doing it later.  I think you'll be able to figure out 
where this is going...

<snip>
> diff -Nur old/u-boot-1.3.0/net/eth.c new/u-boot-1.3.0/net/eth.c
> --- old/u-boot-1.3.0/net/eth.c	2008-03-06 07:56:04.000000000 +0100
> +++ new/u-boot-1.3.0/net/eth.c	2008-03-10 11:18:50.000000000 +0100
> @@ -61,6 +61,7 @@
>   extern int bfin_EMAC_initialize(bd_t *);
>   extern int atstk1000_eth_initialize(bd_t *);
>   extern int atngw100_eth_initialize(bd_t *);
> +extern int hammerhead_eth_initialize(bd_t *);
>   
Change this to board_eth_initialize() and you can be the first soldier 
in the revolution!
>   extern int mcffec_initialize(bd_t*);
>
>   static struct eth_device *eth_devices, *eth_current;
> @@ -258,6 +259,9 @@
>   #if defined(CONFIG_ATNGW100)
>   	atngw100_eth_initialize(bis);
>   #endif
> +#if defined(CONFIG_HAMMERHEAD)
> +	hammerhead_eth_initialize(bis);
> +#endif
>   #if defined(CONFIG_MCFFEC)
>   	mcffec_initialize(bis);
>   #endif
> @@ -522,6 +526,7 @@
>   extern int mcf52x2_miiphy_initialize(bd_t *bis);
>   extern int ns7520_miiphy_initialize(bd_t *bis);
>   extern int dm644x_eth_miiphy_initialize(bd_t *bis);
> +extern int hammerhead_eth_initialize(bd_t *);
>   
This isn't needed twice (They're probably #ifdef'd, but you don't need 
to #ifdef extern'd prototypes)
>
>   int eth_initialize(bd_t *bis)
> @@ -546,6 +551,9 @@
>   #if defined(CONFIG_DRIVER_TI_EMAC)
>   	dm644x_eth_miiphy_initialize(bis);
>   #endif
> +#if defined(CONFIG_HAMMERHEAD)
> +	hammerhead_eth_initialize(bis);
> +#endif
>   	return 0;
>   }
>   #endif
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>   
regards,
Ben




More information about the U-Boot mailing list