]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Moved initialization of Ethernet controllers on Atmel AT91 to board_eth_init()
authorBen Warren <biggerbadderben@gmail.com>
Wed, 13 Aug 2008 05:11:53 +0000 (22:11 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 3 Sep 2008 04:18:16 +0000 (21:18 -0700)
Removed at91sam9_eth_initialize() from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
board/atmel/at91cap9adk/at91cap9adk.c
board/atmel/at91sam9260ek/at91sam9260ek.c
board/atmel/at91sam9263ek/at91sam9263ek.c
cpu/arm926ejs/at91/Makefile
cpu/arm926ejs/at91/ether.c [deleted file]
net/eth.c

index c5082a0925e8ee0348cf0f9efe789c48c71a70c4..787d64d80b0dc188522db8ace7b2e5d8eb45564b 100644 (file)
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
+#include <asm/arch/hardware.h>
 #include <lcd.h>
 #include <atmel_lcdc.h>
 #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
 #include <net.h>
 #endif
+#include <netdev.h>
 
 #define MP_BLOCK_3_BASE        0xFDF00000
 
@@ -376,3 +378,12 @@ void reset_phy(void)
 #endif
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#ifdef CONFIG_MACB
+       rc = macb_eth_initialize(0, (void *)AT91_BASE_EMAC, 0x00);
+#endif
+       return rc;
+}
index 06d8512cc99448cfca5981eb3381a5d7bcc373b9..913e3fb34c13e9df45adf3e6412f793d0f9b53e2 100644 (file)
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
+#include <asm/arch/hardware.h>
 #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
 #include <net.h>
 #endif
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -248,3 +250,12 @@ void reset_phy(void)
 #endif
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#ifdef CONFIG_MACB
+       rc = macb_eth_initialize(0, (void *)AT91_BASE_EMAC, 0x00);
+#endif
+       return rc;
+}
index 927fc912c94fac932a5f6a5c83ed338463afd621..c7050745573b03b836c1d011bfda9f976d47e016 100644 (file)
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
+#include <asm/arch/hardware.h>
 #include <lcd.h>
 #include <atmel_lcdc.h>
 #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
 #include <net.h>
 #endif
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -308,3 +310,12 @@ void reset_phy(void)
 #endif
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#ifdef CONFIG_MACB
+       rc = macb_eth_initialize(0, (void *)AT91_BASE_EMAC, 0x00);
+#endif
+       return rc;
+}
index 44cde1a9c31d4fe19da4aca8899d1e86c6d3bc3f..2d2a888e9c774dc59be3ca850ce595adf61dbc6c 100644 (file)
@@ -25,7 +25,6 @@ include $(TOPDIR)/config.mk
 
 LIB    = $(obj)lib$(SOC).a
 
-COBJS-y        += ether.o
 COBJS-y        += timer.o
 COBJS-$(CONFIG_HAS_DATAFLASH) +=spi.o
 COBJS-y        += usb.o
diff --git a/cpu/arm926ejs/at91/ether.c b/cpu/arm926ejs/at91/ether.c
deleted file mode 100644 (file)
index 7e11fe4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop@leadtechdesign.com>
- * Lead Tech Design <www.leadtechdesign.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 <asm/arch/hardware.h>
-
-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)
-{
-       macb_eth_initialize(0, (void *)AT91_BASE_EMAC, 0x00);
-}
-#endif
index 85fa0da2375fdb785884073956a8c5c81ed25961..71feb07a746dc59edfcf6ec24bcb91f109d5c390 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -66,7 +66,6 @@ extern int scc_initialize(bd_t*);
 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 *);
 
 #ifdef CONFIG_API
 extern void (*push_packet)(volatile void *, int);
@@ -254,10 +253,6 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_RTL8169)
        rtl8169_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");