
Hi Alex,
Alex wrote:
Hi
Sorry, as you might have guessed I did not run MAKEALL to check my patch :-( Worse, It would have broken existing code... Sorry again.
I try to avoid such things in future.
I corrected the patch. I tried to run MAKEALL, but it fails, as I don't have all those cross-compilers installed. Am I missing something? Do I need to install them, or what is the correct procedure?
So instead of MAKEALL I compiled a few targets by hand.
Alex
diff -Naur old/u-boot-avr32/board/miromico/hammerhead/eth.c new/u-boot-avr32/board/miromico/hammerhead/eth.c --- old/u-boot-avr32/board/miromico/hammerhead/eth.c 1970-01-01 01:00:00.000000000 +0100 +++ new/u-boot-avr32/board/miromico/hammerhead/eth.c 2008-03-14 16:06:35.000000000 +0100 @@ -0,0 +1,37 @@ +/*
- Copyright (C) 2008 Miromico AG
- Ethernet initialization for the Miromico Hammerhead AVR32 board
- Mostly copied form Atmel ATNGW100 sources
- 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 board_eth_initialize(bd_t *bi) +{
- macb_eth_initialize(0, (void *)MACB0_BASE, bi->bi_phy_id[0]);
+} +#endif
I don't know the overall status of this patch set, but if you change the name of this function to board_eth_init(bd_t *bi), you won't need to touch /net/eth.c. Sorry for the churn... <snip>
diff -Naur old/u-boot-avr32/net/eth.c new/u-boot-avr32/net/eth.c --- old/u-boot-avr32/net/eth.c 2008-03-17 10:23:50.000000000 +0100 +++ new/u-boot-avr32/net/eth.c 2008-03-17 10:11:33.000000000 +0100 @@ -64,6 +64,7 @@ extern int mcffec_initialize(bd_t*); extern int mcdmafec_initialize(bd_t*); extern int at91cap9_eth_initialize(bd_t *); +extern int board_eth_initialize(bd_t *);
#ifdef CONFIG_API extern void (*push_packet)(volatile void *, int); @@ -287,6 +288,9 @@ #if defined(CONFIG_AT91CAP9) at91cap9_eth_initialize(bis); #endif +#if defined(CONFIG_HAMMERHEAD)
- board_eth_initialize(bis);
+#endif
if (!eth_devices) { puts ("No ethernet found.\n");
I have a patch that will be submitted tomorrow that puts a call to board_eth_init() here, so you don't need to. If this is already in the AVR32 repo no big deal.
regards, Ben