
Hi J-C,
On Tue, Jul 29, 2008 at 4:03 AM, Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com wrote:
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com
diff --git a/cpu/arm926ejs/at91/ether.c b/cpu/arm926ejs/at91/ether.c index 7e11fe4..c54f33b 100644 --- a/cpu/arm926ejs/at91/ether.c +++ b/cpu/arm926ejs/at91/ether.c @@ -25,10 +25,10 @@ #include <common.h> #include <asm/arch/hardware.h>
+#if defined(CONFIG_MACB) && defined(CONFIG_CMD_NET) extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
-#if defined(CONFIG_MACB) && defined(CONFIG_CMD_NET) -void at91sam9_eth_initialize(bd_t *bi) +void cpu_eth_init(bd_t *bi) { macb_eth_initialize(0, (void *)AT91_BASE_EMAC, 0x00); }
Not quite. cpu_eth_init returns int.
diff --git a/net/eth.c b/net/eth.c index 38979aa..53c6622 100644 --- a/net/eth.c +++ b/net/eth.c @@ -74,7 +74,6 @@ extern int greth_initialize(bd_t *); extern int atngw100_eth_initialize(bd_t *); extern int mcffec_initialize(bd_t*); extern int mcdmafec_initialize(bd_t*); -extern int at91sam9_eth_initialize(bd_t *);
#ifdef CONFIG_API extern void (*push_packet)(volatile void *, int); @@ -286,10 +285,6 @@ int eth_initialize(bd_t *bis) #if defined(CONFIG_FSLDMAFEC) mcdmafec_initialize(bis); #endif -#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
- defined(CONFIG_AT91SAM9263)
at91sam9_eth_initialize(bis);
-#endif
if (!eth_devices) { puts ("No ethernet found.\n");
-- 1.5.6.2
Thanks. This won't apply against the net/testing branch because I've already removed a bunch of the other initializations. If you don't mind, I'll take care of this one along with many others in the coming few days.
Contradicting what I mentioned in another e-mail, this one does appear to make more sense as a cpu_eth_init, since all three (plus the new one) call only one MACB controller. Not a strong opinion, though, so if anybody wants it as board_eth_init, speak up.
regards, Ben